Class
CategoryStatisticsViewController
public final class CategoryStatisticsViewController: UINavigationController
A view controller for displaying statistics for categories.
Required scopes: statistics:read
, transactions:read
, transactions:categorize
, categories:read
and calendar:read
.
A CategoryStatisticsViewController
displays an interface for browsing combined sum of categories by month.
Overview
Creating a statistics view requires you to provide which type of categories to display statistics for.
let categoryStatisticsViewController = CategoryStatisticsViewController(tink: <#Tink#>, categoryType: <#Category.Kind#>)
present(categoryStatisticsViewController, animated: true)
The CategoryStatisticsViewController
manages it's own UINavigationController
for navigating between subcategories and transaction lists.
It's designed to be presented modally or in a tab but cannot be pushed into a UINavigationController
.
Relationships
Nested Types
CategoryStatisticsViewController.Style
Conforms To
UIGestureRecognizerDelegate
UINavigationController
Initializers
init(tink:categoryType:style:)
public init(tink: Tink = .shared, categoryType: TinkCore.Category.Kind, style: Style = .pieChart)
Initializes a new view controller.
Parameters
Name | Type | Description |
---|---|---|
tink | Tink |
A configured |
categoryType | TinkCore.Category.Kind |
The type of categories to display statistics for. |
style | Style |
The type of visualization to use when displaying statistics. Defaults to a pie chart style. |
init?(coder:)
@available(*, unavailable) public required init?(coder: NSCoder)
Properties
categoryType
let categoryType: TinkCore.Category.Kind
The type of categories that the view controller is displaying statistics for.
style
let style: Style
The type of visualization to use when displaying statistics.
shouldShowCurrencySymbolInStatisticsTotal
var shouldShowCurrencySymbolInStatisticsTotal = false
Determines whether a currency symbol should be shown for the total amount in the statistics pie charts.
Methods
viewDidLoad()
override public func viewDidLoad()
gestureRecognizerShouldBegin(_:)
public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool