国产探花免费观看_亚洲丰满少妇自慰呻吟_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) 
    } 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 永平县| 昌宁县| 东莞市| 龙山县| 宿松县| 即墨市| 彰化市| 隆昌县| 阿克| 通山县| 仙游县| 石泉县| 呼伦贝尔市| 洛阳市| 铜川市| 准格尔旗| 威信县| 尤溪县| 青河县| 中江县| 定南县| 庆安县| 山丹县| 丰县| 玉门市| 牡丹江市| 开阳县| 溧水县| 南康市| 天门市| 万宁市| 保山市| 乐都县| 广元市| 兰考县| 宣化县| 嵩明县| 苏尼特左旗| 宜兰市| 金溪县| 贵州省|