Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2009, 04:36 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 253
Default 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];
gunther is offline   Reply With Quote
Old 07-01-2009, 05:33 PM   #2 (permalink)
Former NeXTStep Developer
 
Join Date: Mar 2009
Posts: 997
Default

The changes are spelled out in the UITableViewCell documentation.

joe
FlyingDiver is offline   Reply With Quote
Old 07-01-2009, 08:21 PM   #3 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 246
Default

Basicly instead of cell.image use cell.imageView.image. For cell.text use cell.textLabel.text and cell.textLabel.font.
linkmx is online now   Reply With Quote
Old 07-01-2009, 10:10 PM   #4 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 4
Default

Quote:
Originally Posted by gunther View Post
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 10:16 PM.
megatron is offline   Reply With Quote
Old 07-02-2009, 11:42 AM   #5 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 253
Default

thanks!!!!
gunther is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 584
22 members and 562 guests
Andy8888, Arfan, armmzz, bignoggins, BrianSlick, ckgni, dacapo, devangvyas, Duncan C, Hito_kun, kvu, learningtocode, linkmx, LiquidFire, MarcoAlmeida, Monstertaco, oceanlablight, soonw29, sudama, Vineesh
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,775
Threads: 89,203
Posts: 380,586
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Andy8888
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:43 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0