2014-08-28 106 views
-3

我正在写一个简单的tableView应用程序,但是这段代码得到一个错误。显然,“文本”不可用:Swift中不支持从iOS7及更早版本开始弃用的API。即时通讯使用Xcode 6测试版6.我应该如何解决这个问题?XCode 6 Beta 6 if语句

cell.text = taskMgr.tasks[indexPath.row].name 
+2

直接从[UITableViewCell类,参考价格](https://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/ (不推荐使用textLabel和detailTextLabel属性)。“... – 2014-08-28 07:18:50

回答

0

你大概的意思是:

cell.textLabel.text = taskMgr.tasks[indexPath.row].name

+0

谢谢。不要在iOS 3.0中使用textLabel和detailTextLabel属性。刚刚使用“文本”工作在早期的测试版,所以我很困惑 – 2014-08-28 07:19:20