码迷,mamicode.com
首页 > 编程语言 > 详细

Swift开发教程--实现UITableView报错does not conform to protocol 'UITableViewDataSource‘

时间:2015-05-29 18:09:25      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:ios 开发 swift

通过实践,要是把下面三个协议方法都实现了就不会报错了。另外还需要注意!的问题。

  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{
  }
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{      
  }
    
  func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){

        tableView.deselectRowAtIndexPath(indexPath, animated: true)

   } 

Swift开发教程--实现UITableView报错does not conform to protocol 'UITableViewDataSource‘

标签:ios 开发 swift

原文地址:http://blog.csdn.net/wanglixin1999/article/details/46238307

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!