首页 > 编程语言 > 详细

Swift 给UITableView 写extension 时 报错 does not conform to protocol 'UITableViewDataSource'

时间:2017-05-04 13:04:47      阅读:357      评论:0      收藏:0      [点我收藏+]

那是因为你没有实现 数据源和代理方法 实现下就好了  

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 0
    }


    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        return UITableViewCell()
    }

 

Swift 给UITableView 写extension 时 报错 does not conform to protocol 'UITableViewDataSource'

原文:http://www.cnblogs.com/ZhangShengjie/p/6806451.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!