SelectPickerView

@objcMembers
public class SelectPickerView : UIView
extension SelectPickerView: UITableViewDataSource
extension SelectPickerView: UITableViewDelegate

Undocumented

  • Undocumented

    Declaration

    Swift

    override public func layoutSubviews()
  • 展示多选view

    Declaration

    Swift

    public class func showView(title: String,
                               data: [String],
                               defaultSelectedIndexs: [Int]?,
                               cancelAction: @escaping PickerViewManager.BtnAction,
                               sureAction: @escaping PickerViewManager.MultipleDoneAction)
    Parameters
    title

    标题

    data

    数据

    defaultSelectedIndex

    默认选中索引

    cancelAction

    取消回调

    sureAction

    确定回调

  • 获取多选view

    Declaration

    Swift

    public class func getView(title: String, data: [String], defaultSelectedIndexs: [Int]?) -> SelectPickerView?
    Parameters
    title

    标题

    data

    数据

    defaultSelectedIndexs

    默认选中索引,如果为nil,表示都不选中

    Return Value

    SelectPickerView

  • 展示单选view

    Declaration

    Swift

    public class func showSingleView(title: String,
                                     data: [String],
                                     defaultSelectedIndex: Int?,
                                     cancelAction: @escaping PickerViewManager.BtnAction,
                                     sureAction: @escaping PickerViewManager.SingleDoneAction)
    Parameters
    title

    标题

    data

    数据

    defaultSelectedIndex

    默认选中索引

    cancelAction

    取消回调

    sureAction

    确定回调

  • 获取单选view

    Declaration

    Swift

    public class func getSingleView(title: String, data: [String], defaultSelectedIndex: Int?) -> SelectPickerView?
    Parameters
    title

    标题

    data

    数据

    defaultSelectedIndexs

    默认选中索引,如果为nil,表示都不选中

  • 弹出框显示

    Declaration

    Swift

    public func show(completion: ((Bool) -> Void)? = nil)
  • 弹出框消失

    Declaration

    Swift

    @objc
    public func dismiss(completion: ((Bool) -> Void)? = nil)
  • Undocumented

    Declaration

    Swift

    public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
  • Undocumented

    Declaration

    Swift

    public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
  • Undocumented

    Declaration

    Swift

    public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
  • Undocumented

    Declaration

    Swift

    public func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)