TinkMoneyManagerUI Documentation Beta

Class Create​Budget​View​Controller

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)
CreateBudgetViewController CreateBudgetViewController UINavigationController UINavigationController CreateBudgetViewController->UINavigationController

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

tink Tink

A configured Tink object.

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

view​Did​Load()

override public func viewDidLoad()

view​Did​Appear(_:​)

override public func viewDidAppear(_ animated: Bool)