TKUIHomeViewController
open class TKUIHomeViewController : TGCardViewController
The TKUIHomeViewController
class provides a customisable user interface of a
search bar, a map, and a list of components.
How to use
You will need to provide a list of components that specify the content of the home card. You do
so by providing a list of classes that implement TKUIHomeComponentViewModel
:
TKUIHomeCard.config.componentViewModelClasses = [
MyFavoritesViewModel.self,
MySearchHistoryViewModel.self
]
Notes on subclassing
This class is safe to subclass, but you need to pay attention to the order of things in your
viewDidLoad
method:
override func viewDidLoad() {
self.autocompletionDataProviders = /* add your data sources here */
super.viewDidLoad()
// other customisation
}
-
Undocumented
Declaration
Swift
public weak var searchResultsDelegate: TKUIHomeCardSearchResultsDelegate? { get set }
-
Undocumented
Declaration
Swift
public var autocompletionDataProviders: [TKAutocompleting]?
-
Undocumented
Declaration
Swift
public var initialPosition: TGCardPosition?
-
Undocumented
Declaration
Swift
public var mapManager: TKUICompatibleHomeMapManager?
-
Undocumented
Declaration
Swift
public init(mapManager: TKUICompatibleHomeMapManager? = nil, initialPosition: TGCardPosition? = nil)
-
Undocumented
Declaration
Swift
required public init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
open override func viewDidLoad()