DropdownOptionsViewController

@objcMembers open class DropdownOptionsViewController: UITableViewController

View controller for selecting an option from inside a dropdown.

  • Represents a dropdown option, with a display name and value

    Declaration

    Swift

    public typealias Option = (displayName: String, value: String)
  • The list of drop-down options to display.

    Declaration

    Swift

    open var options = [Option]()
  • The currently selected index.

    Declaration

    Swift

    open var selectedIndex = -1
  • Delegate for events that occur on this controller

    Declaration

    Swift

    open weak var delegate: DropdownOptionsViewControllerDelegate?
  • The font to render each cell

    Declaration

    Swift

    open var textLabelFont = UIFont.systemFont(ofSize: 18)
  • The color of the font on each cell

    Declaration

    Swift

    open var textLabelColor: UIColor? = .black
  • The maximum size to use when displaying this view controller as a popover

    Declaration

    Swift

    open var maximumPopoverSize = CGSize(width: 300, height: 300)