Protocol
EditBudgetViewControllerDelegate
public protocol EditBudgetViewControllerDelegate: AnyObject
A set of methods that your delegate object can implement to track when the user edit(update or delete) the budget.
Relationships
Conforms To
AnyObject
Types Conforming to EditBudgetViewControllerDelegate
BudgetDetailsViewController
A view controller that displays details of a budget.
Requirements
editBudgetViewController(_:didEditBudget:)
func editBudgetViewController(_ viewController: EditBudgetViewController, didEditBudget budget: Budget)
Tells the delegate that the user updated a budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | EditBudgetViewController |
The view controller that called this method. |
budget | Budget |
The budget that the user updated. |
editBudgetViewController(_:didDeleteBudget:)
func editBudgetViewController(_ viewController: EditBudgetViewController, didDeleteBudget budget: Budget)
Tells the delegate that the user deleted a budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | EditBudgetViewController |
The view controller that called this method. |
budget | Budget |
The budget that the user deleted. |
editBudgetViewController(_:didFailWithError:)
func editBudgetViewController(_ viewController: EditBudgetViewController, didFailWithError error: Error)
Tells the delegate that an error occurred while the user was editing the budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | EditBudgetViewController |
The view controller that called this method. |
error | Error |
The error that occurred. |