Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

alternative to deprecated UITableViewCell setText?

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?

like image 746
Daryl Spitzer Avatar asked Jul 06 '09 23:07

Daryl Spitzer


4 Answers

try:

cell.textLabel.text = @"test";

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

like image 70
marcc Avatar answered Sep 28 '22 07:09

marcc


Deprecated suggests that you change your code to use the new method suggested by Apple. Any deprecated methods would be removed in the future update releases (for ex: they might remove it from OS 3.1) So, instead of setText, use this

 [cell.textLabel setText] method
like image 25
taus-iDeveloper Avatar answered Sep 25 '22 07:09

taus-iDeveloper


you Use This Code:-

"cell.textLabel.text"

Remove The Warning Of Text deprecated UITableViewCell setText?

like image 22
Yash Kaushik Avatar answered Sep 26 '22 07:09

Yash Kaushik


To address the second question.

I'm not sure what you mean by URL but to get the full text of the build output, which is where the warning bubble comes from:

1) open the build window (default key binding Command-Shift-B)

At the bottom of the build progress view there are four buttons. The buttons from left to right are a checkmark, a warning symbol, some dotted lines, and a popup menu for more options.

Make sure the third symbol, the one with the dotted lines, has a dark grey background. Toggle it if you are in doubt. The new view that is exposed when this button is pressed has the full text output from the build process (compiler, linker, shell script output, etc...)

I believe this is what you are asking about.

You can use the Command-= and Command-Shift-+ to move through the warnings and errors. When you do this the full text of each warning/error bubble will be selected in the full output view.!

like image 34
Mark Avatar answered Sep 26 '22 07:09

Mark