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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 08-21-2009, 02:19 PM   #1 (permalink)
iPhone Developer
 
Join Date: Mar 2009
Posts: 222
LeopardDevX is an unknown quantity at this point
Question UITableview cell detailTextLabel???

What is the simples way to create a detailTextLabel in my cells??

i have tried this:

Code:
cell.detailTextLabel.text = [NSString stringWithFormat:@"This cell is in section: %i", indexPath.section];
But nothing shows up, just the cell picture and the main cellLabel.

How is this done in a simple manner??


Please help.

Thank you.
__________________
Thank You.
LeopardDevX is offline   Reply With Quote
Old 08-21-2009, 02:27 PM   #2 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
jsd is on a distinguished road
Default

Quote:
Originally Posted by LeopardDevX View Post
What is the simples way to create a detailTextLabel in my cells??

i have tried this:

Code:
cell.detailTextLabel.text = [NSString stringWithFormat:@"This cell is in section: %i", indexPath.section];
But nothing shows up, just the cell picture and the main cellLabel.
You have to create the cell with initWithStyle: and one of the UITableViewCellStyles that has a detail label.
jsd is offline   Reply With Quote
Old 08-21-2009, 02:58 PM   #3 (permalink)
iPhone Developer
 
Join Date: Mar 2009
Posts: 222
LeopardDevX is an unknown quantity at this point
Thumbs up

Quote:
Originally Posted by jsd View Post
You have to create the cell with initWithStyle: and one of the UITableViewCellStyles that has a detail label.
It works perfectly.

Thank you, and BTW the Subtitle style works out best if you want a classical detailtext.
__________________
Thank You.
LeopardDevX is offline   Reply With Quote
Old 08-08-2010, 01:54 PM   #4 (permalink)
Mohammad Kalim
 
Join Date: Mar 2010
Location: Karachi, Pakistan
Posts: 37
mk_fastian is on a distinguished road
Thumbs up got the solution

Quote:
Originally Posted by jsd View Post
You have to create the cell with initWithStyle: and one of the UITableViewCellStyles that has a detail label.

thanks its a perfect solution: here is the code:

Code:
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
__________________
AppzVenture

Intel Core i5 Macbook Pro, iPhone/iPad Application Development at AppzVenture
mk_fastian 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: 314
13 members and 301 guests
chiataytuday, coolman, givensur, glenn_sayers, guusleijsten, ipodphone, jbro, mediaspree, mottdog, mtl_tech_guy, Punkjumper, vilisei, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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