Classes

The following classes are available globally.

  • Declaration

    Swift

    open class AlertViewController : NibViewController
    extension AlertViewController: AlertEmbeddableViewControllerDelegate
  • An AlertEmbeddableViewController that can display a heading message, a subheading message, and a dynamic count of buttons in a UIStackView

    See more

    Declaration

    Swift

    open class GenericAlertViewController : NibViewController, AlertEmbeddableViewController
  • Undocumented

    See more

    Declaration

    Swift

    open class LoadingAlertViewController : NibViewController, AlertEmbeddableViewController
  • An AlertEmbeddableViewController that displays a full screen view that forces/asks the user to upgrade the application to its current version

    See more

    Declaration

    Swift

    open class UpgradeCheckViewController : NibViewController, AlertEmbeddableViewController
  • Undocumented

    See more

    Declaration

    Swift

    open class AppInfoViewController : NibViewController
  • A general collection view cell for carousel content.

    See more

    Declaration

    Swift

    open class CarouselItemCell : UICollectionViewCell
  • An abstract base class for providing data and handling actions for a CollectionViewController.

    This is a generic NSObject conforming to UICollectionViewDataSource, UICollectionViewDelegate, UISearchBarDelegate and ContentLoader protocols.

    This class is to be subclassed to comply to a specific behavior.

    The associated type of this class will be used to initialize it’s CollectionDataProvider property. By default, the init(collecitonView:) initialization method assigns the collection view property and sets it up using the setupCollectionView method.

    This class also supports data filtering through UISearchBarDelegate searchBar(_:,textDidChange:) method. It calls the updateFilteredData to update the filtered CollectionDataProvider property. The filteredData(with:) is called to filter the data using the search string.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.
    See more

    Declaration

    Swift

    open class BaseCollectionController<T> : NSObject, CollectionController
  • A subclass of BaseCollectionController that serves as a base class that handles paginated list behavior for a CollectionViewController.

    This CollectionController subclass manages paginated lists by keeping track of the current and loaded pages as well as prefetching succeeding pages. This shows a loading cell at the end of the list when it has not yet reached the last page. Also by default, the layout returns a ListCollectionViewFlowLayout which is similar to a table view.

    By default, this uses ListItemCell for its cells. The associated type can conform to the ListItemCellPresentable to be able to configure the cells to present content of the type.

    When subclassed, the registerComponents and collectionView(collectionView:cellForItemAt:) can be overriden to bypass usage of the ListItemCell. The typical usage of this class when subclassed is:

    • Optionally override registerComponents to register cells and reusable views.
    • Override loadContent(completion:) to fetch and update content.
    • Optionally override collectionView(collectionView:cellForItemAt:) for configuring cells.
    • Override collectionView(collectionView:didSelectItemtAt:) for cell select actions.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.

    See more

    Declaration

    Swift

    open class ListCollectionController<T> : BaseCollectionController<T>, UICollectionViewDataSourcePrefetching
  • A subclass of BaseCollectionController that serves as a base class that handles carousel behavior for a CollectionViewController.

    This CollectionController subclass manages a carousel-like content layout with a page control. The page control receives events to navigate through the content.

    By default, this uses CarouselItemCell for its cells. The associated type can conform to the CarouselItemCellPresentable to be able to configure the cells to present content of the type.

    When subclassed, the registerComponents and collectionView(collectionView:cellForItemAt:) can be overriden to bypass usage of the CarouselItemCell. The typical usage of this class when subclassed is:

    • Optionally override registerComponents to register cells and reusable views.
    • Override loadContent(completion:) to fetch and update content.
    • Optionally override collectionView(collectionView:cellForItemAt:) for configuring cells.
    • Override collectionView(collectionView:didSelectItemtAt:) for cell select actions.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.

    See more

    Declaration

    Swift

    open class CarouselCollectionController<T> : BaseCollectionController<T>
  • Class representing Data to be used in a collection view.

    This class manages a two dimensional array of an associated item type. The first dimension of the array serves as an indicator of the section while the second dimension are the items in the section.

    See more

    Declaration

    Swift

    open class CollectionDataProvider<ItemType>
  • A StatefulViewController subclass that manages a collection view.

    This class has an associated value depending on the associated value of its collection view controller.

    A refresh control is added in the collection view to capture pull to refresh events which will call the refreshContent(completion:) of the collection controller. If there is an error during the refresh, the showRefreshError(title:, message:) by default will show an alert with the error information. The localize description of the error will be passed as the message with no title.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class CollectionViewController : StatefulViewController
  • A CollectionViewFlowLayout that resembles a table view.

    This flow layout mimics a table view layout. It has minimumLineSpacing and minimumInteritemSpacing set to 10. The itemSize is set with the width equal to the collection view frame width minus the left and right section inset, and the height set as the cellHeight property.

    See more

    Declaration

    Swift

    open class ListCollectionViewFlowLayout : UICollectionViewFlowLayout
  • A CollectionViewFlowLayout that resembles a carousel.

    This flow layout mimics a carousel layout. It has minimumLineSpacing and minimumInteritemSpacing set to 0. The itemSize is set equal to the collection view’s frame size.

    See more

    Declaration

    Swift

    open class CarouselCollectionViewFlowLayout : UICollectionViewFlowLayout
  • A CollectionViewFlowLayout that resembles a table view with dynamic height sizing.

    This flow layout mimics a table view layout with dynamic height sizing. It has minimumLineSpacing and minimumInteritemSpacing set to 10.

    Collection view cells used in this layout must override the preferredLayoutAttributesFitting(_:) method to calculate the appropriate height for the cell. One way of doing this is the following:

    override func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes {
        let layoutAttributes = super.preferredLayoutAttributesFitting(layoutAttributes)
        layoutIfNeeded()
        layoutAttributes.frame.size = systemLayoutSizeFitting(UIView.layoutFittingCompressedSize,
                                                              withHorizontalFittingPriority: .required,
                                                              verticalFittingPriority: .fittingSizeLevel)
        return layoutAttributes
    }
    
    See more

    Declaration

    Swift

    open class DynamicListCollectionViewFlowLayout : UICollectionViewFlowLayout
  • A general collection view cell for list content.

    See more

    Declaration

    Swift

    open class ListItemCell : UICollectionViewCell
    extension ListItemCell: Loadable
  • A subclass of BaseCollectionController that shows a list of countries for selection in a CollectionViewController.

    This CollectionController subclass retrieves a list of countries with states from the user defaults using the defaultsKey static property value. The list of countries retrieved from the user defaults is encoded with the following JSON format:

    {
      "name": "<country_name>",
      "code": "<country_code>",
      "states": [
        {
          "label": "<state_label_or_name>",
          "code": "<state_code>"
        }
      ]
    }
    

    The country object contains a name with a string value of the name of the country, a code with a string value of the country code and an array of state objects.

    The state object contains a label with a string value of the name/label of the state, and a code with a string value of the state code.

    The default cell used is a CountryCollectionViewCell. Its nameLabel is used to display the country name. If the country name is empty, the code is displayed instead.

    The countries displayed are sorted alphabetically by the country’s name. If the country’s name is empty, the country’s code is used instead for sorting.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.
    See more

    Declaration

    Swift

    open class CountriesCollectionController : BaseCollectionController<CountriesCollectionController.ItemTuple>
  • The default collection view cell used by the CountriesCollectionController to display the list of countries.

    This cell contains a single label that is used to display the name of the country.

    See more

    Declaration

    Swift

    open class CountryCollectionViewCell : UICollectionViewCell
  • The default collection view cell used by the StatesCollectionController to display the list of states.

    This cell contains a single label that is used to display the name/label of the state.

    See more

    Declaration

    Swift

    open class StateCollectionViewCell : UICollectionViewCell
  • A subclass of CollectionController that shows a list of states for selection in a CollectionViewController.

    This CollectionController subclass displays a list of states based from the value of the country code property. The states are retrieved from the user defaults using the defaultsKey static property value. The list of countries with states retrieved from the user defaults is encoded with the following JSON format:

    {
      "name": "<country_name>",
      "code": "<country_code>",
      "states": [
        {
          "label": "<state_label_or_name>",
          "code": "<state_code>"
        }
      ]
    }
    

    The country object contains a name with a string value of the name of the country, a code with a string value of the country code and an array of state objects.

    The state object contains a label with a string value of the name/label of the state, and a code with a string value of the state code.

    The default cell used is a StateCollectionViewCell. Its nameLabel is used to display the state name/label. If the state name/label is empty, the code is displayed instead.

    The states displayed are sorted alphabetically by the state’s name/label. If the state’s name/label is empty, the state’s code is used instead for sorting.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.
    See more

    Declaration

    Swift

    open class StatesCollectionController : CountriesCollectionController
  • A StatefulViewController subclass that manages a generic detail view.

    This view controller serves as the base design of a detail view. An object conforming to the DetailController protocol is the data provider and action handler of this view controller.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class DetailViewController : StatefulViewController
  • A wrapper class setting up the presentation of an UIImagePickerController by a designated view controller. This wrapper class only accepts media types of image or movie.

    See more

    Declaration

    Swift

    open class ImagePickerPresenter : NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate
  • A subclass of CollectionController which displays the Menu for selection in a MenuViewController.

    This CollectionController utilizes ListCollectionViewFlowLayout which imitates the table view layout.

    By default, this uses MenuItemCell for its cells. The associated type should conform to the MenuItemCellPresentable to be able to configure the cells to present content of the type.

    Note

    Due to what maybe seems to be a bug with the Swift, methods not initially in the superclass and implemented in the subclass may not be executed. To get around this, the method needs to have an @objc attribue.
    See more

    Declaration

    Swift

    open class MenuCollectionController : BaseCollectionController<MenuItemCellPresentable>
  • This is the default collection view cell used by the MenuCollectionController to display the list of Menu.

    See more

    Declaration

    Swift

    open class MenuItemCell : UICollectionViewCell
  • A subclass of CollectionViewController that shows a list of menu items with a log out button.

    See more

    Declaration

    Swift

    open class MenuViewController : CollectionViewController
  • A view controller that can be initialized with a specified nib name or a nib named the same as its class name.

    The bundle for the nib is found by the bundle(forFileName:) extension method of Bundle.

    See more

    Declaration

    Swift

    open class NibViewController : UIViewController
  • A NibViewController subclass that scans codes using the device’s camera.

    This view controller captures codes from the device’s camera. The code is then passed into the captureAction closure property.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class ScannerViewController : NibViewController, AVCaptureMetadataOutputObjectsDelegate
  • A NibViewController subclass that manages segmented views.

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.

    This includes a segmented control that receives value changed events to change the shown view inside its container view. Data and selection actions are managed by an object conforming to SegmentedController which is assigned to the segmentedController property.

    See more

    Declaration

    Swift

    open class SegmentedViewController : NibViewController
  • A custom UIButton that serves as a check box by using an image Important: According to apple’s ios HIG, the size of the image should be approriate to its container or it will be displayed undesirably

    See more

    Declaration

    Swift

    open class CheckBox : SelectionButton
  • A subclass of CheckBox that serves as a radio button that has an event listener/emitter to other radio buttons within the same group

    See more

    Declaration

    Swift

    open class RadioButton : CheckBox
  • A custom UIButtonthat serves as a rating button that has an event listener/emitter to other rating buttons within the same group

    See more

    Declaration

    Swift

    open class RatingButton : SelectionButton
  • Undocumented

    See more

    Declaration

    Swift

    open class SelectionButton : UIButton
  • A NibViewController subclass conforming to the LoadableViewController.

    This view controller is the default design for a loading view controller. It has an activity indicator and a label for a loading message.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class DefaultLoadingViewController : NibViewController, LoadableViewController
  • A NibViewController subclass conforming to the ReloadableViewController.

    This view controller is the default design for a reload view controller. It has a label for a reload message and a button to execute the reload.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class DefaultReloadViewController : NibViewController, ReloadableViewController
  • A NibViewController subclass that manages and displays states of content.

    This view controller handles states of loading content by displaying the appropriate child view controller depending of the state.

    Note

    Being a subclass of a NibViewController, an associated nib file is required with outlets connected.
    See more

    Declaration

    Swift

    open class StatefulViewController : NibViewController, Navigator
  • Undocumented

    See more

    Declaration

    Swift

    open class FloatingTextField : UITextField
  • Undocumented

    See more

    Declaration

    Swift

    open class FloatingTextFieldWithIcon : FloatingTextField
  • Undocumented

    See more

    Declaration

    Swift

    open class FloatingTextView : GrowingTextView
  • Undocumented

    See more

    Declaration

    Swift

    open class GrowingTextView : UIScrollView
  • UIWindow that will be use whenever a ColorTheme will be applied on an Application.

    Declaration

    Swift

    public final class CheetahAppWindow : UIWindow
  • Undocumented

    See more

    Declaration

    Swift

    open class CheetahColorThemePainter : ColorThemePainter
  • Class for applying new theme by using the applyTheme function of the shared instance of this class.

    See more

    Declaration

    Swift

    open class ThemeManager
  • A NibViewController subclass that displays web content.

    This view controller holds a WKWebView and a UIProgressView. The progress view is only shown when the web view is loading content. This view controller also conforms to WKNavigationDelegate.

    See more

    Declaration

    Swift

    open class WebViewController : NibViewController, WKNavigationDelegate