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];
精彩评论