开发者

If text is deprecated in my didSelectRowAtIndexPath what should I use going forward?

In my "didSelectRowAtIndexPath" method I noticed that Xcode highlights "text" and s开发者_StackOverfloways it's deprecated. What should I be using instead of text here?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  [appDelegate itemClicked:[[tableView cellForRowAtIndexPath:indexPath] text]];
}


Do it like this:

  [appDelegate itemClicked:[[tableView cellForRowAtIndexPath:indexPath] textLabel].text];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜