Protocols

The following protocols are available globally.

  • Fading protocol animates view in and out

    See more

    Declaration

    Swift

    public protocol Fading : UIView
  • Protocol auto size the cell to the device width Note: collectionView.collectionViewLayout estimatedItemSize should equal to UICollectionViewFlowLayoutAutomaticSize

    available iOS 10 and above Note> Only supports portraite atm. Landscape is still in R&D

    See more

    Declaration

    Swift

    @available(iOS 10.0, *)
    public protocol AutoSizeable
  • Type is a single object withing a collection of types

    See also

    DataType

    Declaration

    Swift

    @available(*, deprecated, message: "Renamed to `Model`.Migrate to https://github.com/stanwood/SourceModel_iOS")
    public protocol Type
  • DataType is an object that stores a collection of types.

    See also

    Type
    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Renamed to `ModelCollection`. Migrate to https://github.com/stanwood/SourceModel_iOS")
    public protocol DataType
  • Delegateble protocol of type UICollectionViewCell || UITableViewCell used to set a delegate of type AnyObject

    Example: Delegetable example
    protocol ModuleCellOneDelegate: class {
       func didTapEvent()
    }
    
    protocol ModuleCellTwoDelegate: class {
       func didTapEvent()
    }
    
    protocol ModuleCellsDelegate: ModuleCellOneDelegate, ModuleCellTwoDelegate {}
    
    class ModuleViewController: UIViewController, ModuleCellsDelegate {}
    
    class Cell: UICollectionViewCell: Delegetable {
    
       .....
    
       cell.set(delegate: self) {}
    }
    

    See also

    Type DataType

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Migrate to https://github.com/stanwood/SourceModel_iOS")
    public protocol Delegateble : ForceDelegateble
  • Disposable protocol for disposing UIView‘s from superviews

    See more

    Declaration

    Swift

    public protocol Disposable : UIView
  • Fillable protocol of type UICollectionViewCell used to fill cells with type object

    Example: Fillable example
    cell.fill(with: model)
    

    See also

    Model ModelCollection

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Migrate to https://github.com/stanwood/SourceModel_iOS")
    public protocol Fillable : ForceFillable
  • Headerable protocol to add header support for UICollectionView and UITableView

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Migrate to https://github.com/stanwood/SourceModel_iOS")
    @objc
    public protocol Headerable
  • Lodable protocol to load from nib

    See more

    Declaration

    Swift

    public protocol Loadable
  • Presentable protocol represents a Presentable class in the stanwood architecture

    See more

    Declaration

    Swift

    public protocol Presentable
  • SourceTypePresentable protocol represents a Presentable class in the stanwood architecture

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Moved to https://github.com/stanwood/SourceModel_iOS")
    public protocol SourceTypePresentable