Class
CreateBudgetViewController
public final class CreateBudgetViewController: UINavigationController
A view controller that can be used to create a budget.
Use the CreateBudgetViewController
when you want to create a budget.
Required scopes: budgets:write
, budgets:read
.
To handle what should happen after the budget has been created or if it failed, check the result from the completion
closure.
let createBudgetViewController = CreateBudgetViewController() { [weak self] result in
DispatchQueue.main.async {
do {
let budget = try result.get()
<#code#>
} catch {
<#error#>
}
}
}
present(createBudgetViewController, animated: true)
Relationships
Conforms To
UINavigationController
Initializers
init(tink:completion:)
public convenience init(tink: Tink = .shared, completion: @escaping (Result<Budget, Error>) -> Void)
Initializes a new view controller.
Parameters
Name | Type | Description |
---|---|---|
tink | Tink |
A configured |
completion | @escaping (Result<Budget, Error>) -> Void |
A completion handler that will be triggered when the user has attempted to create a budget. Will either contain the newly created budget or an error if the operation failed. |
Methods
viewDidLoad()
override public func viewDidLoad()
viewDidAppear(_:)
override public func viewDidAppear(_ animated: Bool)