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:

    override func viewDidLoad() {
       self.autocompletionDataProviders = /* add your data sources here */
    
       super.viewDidLoad()
    
       // other customisation
    }
    
    See more

    Declaration

    Swift

    open class TKUIHomeViewController : TGCardViewController
  • Undocumented

    See more

    Declaration

    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 TKUIHomeCard

    See more

    Declaration

    Swift

    public protocol TKUIHomeCardSearchResultsDelegate : AnyObject
  • This protocol defines the requirements for any view models that may display their contents in a TKUIHomeCard.

    See more

    Declaration

    Swift

    @MainActor
    public protocol TKUIHomeComponentViewModel
  • Undocumented

    See more

    Declaration

    Swift

    public struct TKUIHomeComponentContent
  • Undocumented

    See more

    Declaration

    Swift

    public struct TKUIHomeComponentInput
  • This is the item that will be used in the context of RxTableViewSectionedAnimatedDataSource

    See more

    Declaration

    Swift

    public protocol TKUIHomeComponentItem
  • Undocumented

    See more

    Declaration

    Swift

    public struct TKUIHomeHeaderConfiguration
  • The representation of an home card component for the customizer

    See more

    Declaration

    Swift

    public struct TKUIHomeCardCustomizerItem