开发者

Correct way to get UITableViewCell's text

Simple question though, but what is the correct way to get the text off my UITableViewCell?

With cell a UITableViewCell:

I开发者_Go百科 know off cell.text, which gives exactly what I want, but is deprecated in iOS 3.0.

The only alternative I could find was cell.textLabel but this gives me the same (or almost?) as if I only used cell. Which is obviously not what I want.

So how can I get the text on my cell (what the user reads)? Or is it okay if I leave it as cell.text / will Apple accept it?


Simply use cell.textLabel.text = @"My Text"; and NSString *mytext = cell.textLabel.text as long as you are targeting 3.0 or above.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜