表视图警告 [英] table view Warning

查看:109
本文介绍了表视图警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了使用viewcontroller的表视图示例。当我运行时我得到了这个错误我可能知道我犯了错误

i have tried the table view sample with the viewcontroller.when im running i got this error may i know wher im making mistake

警告:使用遗产由于tableView的委托实现导致的单元格布局:accessoryTypeForRowWithIndexPath

推荐答案

tableView:accessoryTypeForRowWithIndexPath:在iPhone OS 3.0中已弃用,注释如下:

tableView:accessoryTypeForRowWithIndexPath: is deprecated in iPhone OS 3.0 with the following note:


使用附件视图和附件类型属性(配置表视图单元格时,UITableViewCell类的正常模式和编辑模式。

Use the accessory-view and accessory-type properties (for both normal and editing modes) of the UITableViewCell class when configuring table-view cells.

它们表示你应该设置accessoryType / accessoryView属性在 tableView:cellForRowAtIndexPath:而不是。

They mean you should set accessoryType/accessoryView properties in tableView:cellForRowAtIndexPath: instead.

这篇关于表视图警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆