【发布时间】:2014-07-17 18:39:43
【问题描述】:
我正准备将 iOS 6 iPhone 应用程序更新到 iOS8。此代码的第二行产生一条错误消息(“文本”已弃用。在 iOS 3.0 中首次弃用)。语法错误多年来一直在我的应用程序中没有造成问题,但我认为我会在完成我的 iOS 8 版本之前清理所有错误。
- (void)tableView:(UITableView *)tv1 didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[appDelegate muniClicked:[[tableView cellForRowAtIndexPath:indexPath] text]];
NSLog(@"cell clicked {%d, %d}}", indexPath.row, indexPath.section);
}
【问题讨论】:
-
你的问题到底是什么?
-
您查看过
UITableViewCell的文档吗?自 iOS 3.0 起,text属性已被弃用!文档告诉你用什么代替它。
标签: ios objective-c uitableview deprecation-warning