Date and Time selector ios source code, selector ios source code
The source code is a date and time selector. The source code is DVDatePickerTableViewCell, and DVDatePickerTableViewCell is a cell written in Swift. You can provide a date and time selector in tebleView and continue to display it on the Cell. :
Usage:
DVDatePickerTableViewCell can be used as a cell. Var cells: NSArray = [] Cells = [[DVDatePickerTableViewCell (style: UITableViewCellStyle. Default, reuseIdentifier: nil)]
Override func tableView (tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath)-> UITableViewCell { Return cells [indexPath. section] [indexPath. row] as UITableViewCell }
Override func tableView (tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath ){
Var cell = self. tableView (tableView, cellForRowAtIndexPath: indexPath) If (cell. isKindOfClass (DVDatePickerTableViewCell )){ Var datePickerTableViewCell = cell as DVDatePickerTableViewCell DatePickerTableViewCell. selectedInTableView (tableView) }
Self. tableView. deselectRowAtIndexPath (indexPath, animated: true) } |