国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

日期時間的選擇器ios源碼

2019-11-14 19:50:50
字體:
來源:轉載
供稿:網友

這個源碼案例是一個日期時間的選擇器,源碼DVDatePickerTableViewCell,DVDatePickerTableViewCell是使用Swift寫的cell。可以在tebleView中提供一個日期時間的選擇器,并持續顯示在Cell上。
效果圖:
  • <ignore_js_op> 

使用方法:


DVDatePickerTableViewCell想平常使用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) 
    } 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 出国| 芮城县| 班玛县| 边坝县| 宣化县| 阿城市| 万山特区| 汝南县| 马尔康县| 木兰县| 南华县| 保靖县| 始兴县| 阜阳市| 伊通| 教育| 亳州市| 藁城市| 邹平县| 英德市| 龙胜| 芦山县| 阜平县| 安泽县| 永胜县| 区。| 淮阳县| 望都县| 闸北区| 广丰县| 马龙县| 盐池县| 岗巴县| 郁南县| 东平县| 交城县| 双柏县| 克拉玛依市| 株洲市| 苏尼特左旗| 始兴县|