XBPickerView 2.1.0

XBPickerView 2.1.0

Maintained by LiuSkya.



  • By
  • xiaobin liu

XBPickerView

CI Status Version License Platform

Requirements:

  • iOS 9.0+
  • Xcode 10.0+
  • Swift 5.0+

Demo Figure

Installation Cocoapods

pod 'XBPickerView', '~> 2.1.0'

Use

    private lazy var pickerView: PickerView = {
        $0.delegate = self
        $0.dataSource = self
        $0.unitAttributedText = NSAttributedString(string: "厘米", attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 15),
        NSAttributedString.Key.foregroundColor: UIColor.black,
        NSAttributedString.Key.backgroundColor: UIColor.clear])
        $0.unitLabelLeftConstraint?.constant = 50
        $0.selectedAttributes = [.font: UIFont.systemFont(ofSize: 30), .foregroundColor: UIColor.red]
        $0.translatesAutoresizingMaskIntoConstraints = false
        return $0
    }(PickerView())

License

XBPickerView is released under an MIT license. See LICENSE for more information.