views:

6015

answers:

2

Code in the book Beginning iPhone Development (by Dave Mark & Jeff LaMarche) assigns to the UITableViewCell text property:

UITableViewCell *cell = ...
...
cell.text = ...

This assignment brings up a "'setText' is deprecated..." warning. What should I use as an alternative?

Also, how do I open the long URL in the warning (in Xcode) without retyping the whole thing?

+23  A: 

try:

cell.textLabel.text = @"test";

(Ah, it's nice to be answer 3.0 SDK questions now)

marcc
Thanks. Is there no answer to my Xcode URL question? (Should I pose that as a separate question?)
Daryl Spitzer
I'm not sure. I don't get a nice URL in the deprecated error :)Try hitting Shift + Command + B to open the build results menu. You might be able to copy/paste from there. Other than that, I don't think you can do it.
marcc
+1  A: 
Mark Thalman

related questions