Classes
The following classes are available globally.
-
A container
See moreNibViewController
that contains anAlertEmbeddableViewController
Declaration
Swift
open class AlertViewController : NibViewController
extension AlertViewController: AlertEmbeddableViewControllerDelegate
-
An
See moreAlertEmbeddableViewController
that can display a heading message, a subheading message, and a dynamic count of buttons in aUIStackView
Declaration
Swift
open class GenericAlertViewController : NibViewController, AlertEmbeddableViewController
-
Undocumented
See moreDeclaration
Swift
open class LoadingAlertViewController : NibViewController, AlertEmbeddableViewController
-
An
See moreAlertEmbeddableViewController
that displays a full screen view that forces/asks the user to upgrade the application to its current versionDeclaration
Swift
open class UpgradeCheckViewController : NibViewController, AlertEmbeddableViewController
-
Undocumented
See moreDeclaration
Swift
open class AppInfoViewController : NibViewController
-
A general collection view cell for carousel content.
See moreDeclaration
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
andContentLoader
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, theinit(collecitonView:)
initialization method assigns the collection view property and sets it up using thesetupCollectionView
method.This class also supports data filtering through
UISearchBarDelegate
searchBar(_:,textDidChange:)
method. It calls theupdateFilteredData
to update the filteredCollectionDataProvider
property. ThefilteredData(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.Declaration
Swift
open class BaseCollectionController<T> : NSObject, CollectionController
-
A subclass of
BaseCollectionController
that serves as a base class that handles paginated list behavior for aCollectionViewController
.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 aListCollectionViewFlowLayout
which is similar to a table view.By default, this uses
ListItemCell
for its cells. The associated type can conform to theListItemCellPresentable
to be able to configure the cells to present content of the type.When subclassed, the
registerComponents
andcollectionView(collectionView:cellForItemAt:)
can be overriden to bypass usage of theListItemCell
. 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.Declaration
Swift
open class ListCollectionController<T> : BaseCollectionController<T>, UICollectionViewDataSourcePrefetching
- Optionally override
-
A subclass of
BaseCollectionController
that serves as a base class that handles carousel behavior for aCollectionViewController
.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 theCarouselItemCellPresentable
to be able to configure the cells to present content of the type.When subclassed, the
registerComponents
andcollectionView(collectionView:cellForItemAt:)
can be overriden to bypass usage of theCarouselItemCell
. 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.Declaration
Swift
open class CarouselCollectionController<T> : BaseCollectionController<T>
- Optionally override
-
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 moreDeclaration
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, theshowRefreshError(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 aNibViewController
, an associated nib file is required with outlets connected.Declaration
Swift
open class CollectionViewController : StatefulViewController
-
A CollectionViewFlowLayout that resembles a table view.
This flow layout mimics a table view layout. It has
See moreminimumLineSpacing
andminimumInteritemSpacing
set to 10. TheitemSize
is set with the width equal to the collection view frame width minus the left and right section inset, and the height set as thecellHeight
property.Declaration
Swift
open class ListCollectionViewFlowLayout : UICollectionViewFlowLayout
-
A CollectionViewFlowLayout that resembles a carousel.
This flow layout mimics a carousel layout. It has
See moreminimumLineSpacing
andminimumInteritemSpacing
set to 0. TheitemSize
is set equal to the collection view’s frame size.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
andminimumInteritemSpacing
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:
See moreoverride func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes { let layoutAttributes = super.preferredLayoutAttributesFitting(layoutAttributes) layoutIfNeeded() layoutAttributes.frame.size = systemLayoutSizeFitting(UIView.layoutFittingCompressedSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) return layoutAttributes }
Declaration
Swift
open class DynamicListCollectionViewFlowLayout : UICollectionViewFlowLayout
-
A subclass of
BaseCollectionController
that shows a list of countries for selection in aCollectionViewController
.This
CollectionController
subclass retrieves a list of countries with states from the user defaults using thedefaultsKey
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, acode
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 acode
with a string value of the state code.The default cell used is a
CountryCollectionViewCell
. ItsnameLabel
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.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 moreDeclaration
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 moreDeclaration
Swift
open class StateCollectionViewCell : UICollectionViewCell
-
A subclass of
CollectionController
that shows a list of states for selection in aCollectionViewController
.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 thedefaultsKey
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, acode
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 acode
with a string value of the state code.The default cell used is a
StateCollectionViewCell
. ItsnameLabel
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.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 aNibViewController
, an associated nib file is required with outlets connected.Declaration
Swift
open class DetailViewController : StatefulViewController
-
A wrapper class setting up the presentation of an
See moreUIImagePickerController
by a designated view controller. This wrapper class only accepts media types of image or movie.Declaration
Swift
open class ImagePickerPresenter : NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate
-
A subclass of
CollectionController
which displays the Menu for selection in aMenuViewController
.This
CollectionController
utilizesListCollectionViewFlowLayout
which imitates the table view layout.By default, this uses
MenuItemCell
for its cells. The associated type should conform to theMenuItemCellPresentable
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.Declaration
Swift
open class MenuCollectionController : BaseCollectionController<MenuItemCellPresentable>
-
This is the default collection view cell used by the
See moreMenuCollectionController
to display the list of Menu.Declaration
Swift
open class MenuItemCell : UICollectionViewCell
-
A subclass of
See moreCollectionViewController
that shows a list of menu items with a log out button.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
See morebundle(forFileName:)
extension method ofBundle
.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 aNibViewController
, an associated nib file is required with outlets connected.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
See moreSegmentedController
which is assigned to thesegmentedController
property.Declaration
Swift
open class SegmentedViewController : NibViewController
-
A custom
See moreUIButton
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 undesirablyDeclaration
Swift
open class CheckBox : SelectionButton
-
A custom
See moreUIButton
that serves as a rating button that has an event listener/emitter to other rating buttons within the same groupDeclaration
Swift
open class RatingButton : SelectionButton
-
Undocumented
See moreDeclaration
Swift
open class SelectionButton : UIButton
-
A
NibViewController
subclass conforming to theLoadableViewController
.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 aNibViewController
, an associated nib file is required with outlets connected.Declaration
Swift
open class DefaultLoadingViewController : NibViewController, LoadableViewController
-
A
NibViewController
subclass conforming to theReloadableViewController
.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 aNibViewController
, an associated nib file is required with outlets connected.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 aNibViewController
, an associated nib file is required with outlets connected.Declaration
Swift
open class StatefulViewController : NibViewController, Navigator
-
Undocumented
See moreDeclaration
Swift
open class FloatingTextField : UITextField
-
Undocumented
See moreDeclaration
Swift
open class FloatingTextFieldWithIcon : FloatingTextField
-
Undocumented
See moreDeclaration
Swift
open class FloatingTextView : GrowingTextView
-
Undocumented
See moreDeclaration
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 moreDeclaration
Swift
open class CheetahColorThemePainter : ColorThemePainter
-
Class for applying new theme by using the applyTheme function of the shared instance of this class.
See moreDeclaration
Swift
open class ThemeManager
-
A
NibViewController
subclass that displays web content.This view controller holds a
See moreWKWebView
and aUIProgressView
. The progress view is only shown when the web view is loading content. This view controller also conforms toWKNavigationDelegate
.Declaration
Swift
open class WebViewController : NibViewController, WKNavigationDelegate