Home Screen
-
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:
See moreoverride func viewDidLoad() { self.autocompletionDataProviders = /* add your data sources here */ super.viewDidLoad() // other customisation }
Declaration
Swift
open class TKUIHomeViewController : TGCardViewController
-
Undocumented
See moreDeclaration
Swift
open class TKUIHomeCard : TKUITableCard
extension TKUIHomeCard: TKUIRoutingQueryInputCardDelegate
extension TKUIHomeCard: UISearchBarDelegate
extension TKUIHomeCard: UITableViewDelegate
-
This protocol defines the method you can use to receive message related to the search functionality provided in a
See moreTKUIHomeCard
Declaration
Swift
public protocol TKUIHomeCardSearchResultsDelegate : AnyObject
-
This protocol defines the requirements for any view models that may display their contents in a
See moreTKUIHomeCard
.Declaration
Swift
@MainActor public protocol TKUIHomeComponentViewModel
-
Undocumented
See moreDeclaration
Swift
public struct TKUIHomeComponentContent
-
Undocumented
See moreDeclaration
Swift
public struct TKUIHomeComponentInput
-
This is the
See moreitem
that will be used in the context ofRxTableViewSectionedAnimatedDataSource
Declaration
Swift
public protocol TKUIHomeComponentItem
-
Undocumented
See moreDeclaration
Swift
public struct TKUIHomeHeaderConfiguration
-
The representation of an home card component for the customizer
See moreDeclaration
Swift
public struct TKUIHomeCardCustomizerItem