import TableCellPicker
// Add the following in viewDidLoad:
// To set the desired normal & expanded cell height
TableCellPicker.normalHeight = 40
TableCellPicker.expandedHeight = 201
// To set the picker view properties
TableCellPicker.setPickerBackgroundColor = UIColor.clearColor()
TableCellPicker.setPickerFontStyle = UIFont(name: "Chalkduster", size: 15)!
TableCellPicker.setPickerTextColor = UIColor.blueColor()
TableCellPicker.setPickerTextAlignment = NSTextAlignment.Center
// To register the nib of the custom cell first
let nibBundle = NSBundle(forClass: TableCellPicker.self)
let cellNib = UINib(nibName: CELL_ID, bundle: nibBundle)
tblView.registerNib(cellNib, forCellReuseIdentifier: CELL_ID)
// Fill-in the code for the TableView functions
// See sample code on the Example Project
运行示例项目以查看整个样本代码,了解如何在项目中使用 TableCellPicker pod。
TableCellPicker 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "TableCellPicker"
TableCellPicker 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。