Protocol
BudgetDetailsViewControllerDelegate
public protocol BudgetDetailsViewControllerDelegate: AnyObject
A set of methods that your delegate object can implement to track when the user edit the budget.
Relationships
Conforms To
AnyObject
Requirements
budgetDetailsViewController(_:didUpdateBudget:)
func budgetDetailsViewController(_ viewController: BudgetDetailsViewController, didUpdateBudget budget: Budget)
Tells the delegate that the user updated a budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | BudgetDetailsViewController |
The view controller that called this method. |
budget | Budget |
The budget that the user updated. |
budgetDetailsViewController(_:didDeleteBudget:)
func budgetDetailsViewController(_ viewController: BudgetDetailsViewController, didDeleteBudget budget: Budget)
Tells the delegate that the user deleted a budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | BudgetDetailsViewController |
The view controller that called this method. |
budget | Budget |
The budget that the user deleted. |
budgetDetailsViewController(_:didFailWithError:)
func budgetDetailsViewController(_ viewController: BudgetDetailsViewController, didFailWithError error: Error)
Tells the delegate that an error occurred when the user attempted to edit the budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | BudgetDetailsViewController |
The view controller that called this method. |
error | Error |
The error that occurred. |