RAMReel

public class RAMReel
    <
    CellClass: UICollectionViewCell,
    TextFieldClass: UITextField,
    DataSource: FlowDataSource
    where
    CellClass: ConfigurableCell,
    CellClass.DataType   == DataSource.ResultType,
    DataSource.QueryType == String,
    DataSource.ResultType: Renderable,
    DataSource.ResultType: Parsable
>

RAMReel

Reel class

  • Container view

    Declaration

    Swift

    public let view: UIView
  • Type of selected item change callback hook

    Declaration

    Swift

    public typealias HookType = (DataSource.ResultType) -> ()
  • Delegate of text field, is used for extra control over text field.

    Declaration

    Swift

    public var textFieldDelegate: UITextFieldDelegate?
  • Use this method when you want textField release input focus.

    Declaration

    Swift

    public func resignFirstResponder()
  • Collection view with data items.

    Declaration

    Swift

    public let collectionView: UICollectionView
  • Data source of RAMReel

    Declaration

    Swift

    public let dataSource: DataSource
  • Use this property to get which item was selected. Value is nil, if data source output is empty.

    Declaration

    Swift

    public var selectedItem: DataSource.ResultType?
  • This hooks that are called on selected item change

    Declaration

    Swift

    public var hooks: [HookType] = []
  • Visual appearance theme

    Declaration

    Swift

    public var theme: Theme = RAMTheme.sharedTheme
  • Placeholder in text field.

    Declaration

    Swift

    public var placeholder: String = ""
  • Creates new RAMReel instance.

    • parameters:
      • frame: Rect that Reel will occupy
      • dataSource: Object of type that implements FlowDataSource protocol
      • placeholder: Optional text field placeholder
      • hook: Optional initial value change hook

    Declaration

    Swift

    public init(frame: CGRect, dataSource: DataSource, placeholder: String = "", hook: HookType? = nil)

    Parameters

    frame

    Rect that Reel will occupy

    dataSource

    Object of type that implements FlowDataSource protocol

    placeholder

    Optional text field placeholder

    hook

    Optional initial value change hook

  • Call this method to update RAMReel visuals before showing it.

    Declaration

    Swift

    public func prepareForViewing()
  • If you use RAMReel to enter set of values from the list call this method before each input.

    Declaration

    Swift

    public func prepareForReuse()