 |
 |
|
 |
07-01-2009, 03:36 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Posts: 196
|
deprecated cell.font, cell.image.. etc.. how do it?
hi, i have in my app warnings when set information at the cell object whit font, images, etc.. this works but in my xcode i see severals lines yellow!! can tell me how do is the correct way for write this functions in os 3.0?
Code:
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
here!!! cell.font = [UIFont boldSystemFontOfSize:12.0];
}
// Set up the cell...
UIImage *image = [UIImage imageNamed:@"iconPages.png"];
here!!! cell.image = image;
here!!! cell.text = [arrayfav objectAtIndex:indexPath.row];
|
|
|
07-01-2009, 04:33 PM
|
#2 (permalink)
|
|
Former NeXTStep Developer
Join Date: Mar 2009
Posts: 997
|
The changes are spelled out in the UITableViewCell documentation.
joe
|
|
|
07-01-2009, 07:21 PM
|
#3 (permalink)
|
|
Registered Member
Join Date: May 2009
Posts: 103
|
Basicly instead of cell.image use cell.imageView.image. For cell.text use cell.textLabel.text and cell.textLabel.font.
|
|
|
07-01-2009, 09:10 PM
|
#4 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Posts: 4
|
Quote:
Originally Posted by gunther
hi, i have in my app warnings when set information at the cell object whit font, images, etc.. this works but in my xcode i see severals lines yellow!! can tell me how do is the correct way for write this functions in os 3.0?
Code:
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
here!!! cell.font = [UIFont boldSystemFontOfSize:12.0];
}
// Set up the cell...
UIImage *image = [UIImage imageNamed:@"iconPages.png"];
here!!! cell.image = image;
here!!! cell.text = [arrayfav objectAtIndex:indexPath.row];
|
For the cell.text part you use.
Code:
cell.textLabel.text = [arrayfav objectAtIndex:indexPath.row];
For the cell.image part you use.
Code:
cell.imageView.image = [UIImage imageNamed:@"iconPages.png"];
I think the image one's correct, can't remember off the top of my head without looking at a previous project file, I'm sure that's what I've used before.
Regards
Last edited by megatron; 07-01-2009 at 09:16 PM.
|
|
|
07-02-2009, 10:42 AM
|
#5 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Posts: 196
|
thanks!!!!
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 369 |
| 32 members and 337 guests |
| amr8, Appency, appie, awesomeguys, bensj, BrianSlick, cje, computermatt, CunningCat, Dracor, dre, embedded, georgeburns, haza100, howardie08, Irishdawg90, jack_the_rat, JasonR, jmurff, jonn4y, jpatzer, kamau, kilobytedump, MarkC, meosoft, Oliver Drobnik, redon, rjgrune, Scott Stahurski, SonaKily418, SPAS, yannickd60 |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,308
Threads: 39,107
Posts: 171,455
Top Poster: smasher (2,575)
|
| Welcome to our newest member, howardie08 |
|