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 07-11-2010, 12:16 PM   #1 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 61
Leon112 is on a distinguished road
Default line-spacing within a cell - multiplelines

Hello, I've searched every where to see if i can add some spacing between multiple lines within a cell, i found some old posts that said its a property of a font, i looked up apples documentation but wasn't sure if i am using the right term.

is there a way to add some spacing between the lines??

below is my code.

Thanks in advance.

Code:
- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
    
    NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:indexPath];
	
	cell.textLabel.text = [[managedObject valueForKey:@"text"] description];
	[cell.textLabel sizeToFit]; 

	cell.textLabel.numberOfLines = 0;
	
	
	cell.textLabel.font = [UIFont systemFontOfSize:FONT_SIZE];

    
}
Leon112 is offline   Reply With Quote
Old 07-11-2010, 12:43 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

What exactly are you trying to do... are you trying to wrap text of arbitrary length? Or are you trying to just put multiple fixed length lines in a table view cell?

If it's the latter, just make your own custom cell with multiple UILabels placed however you'd like. If it's the former, well, I'd still make a custom cell, and put a UITextView in it.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 07-11-2010, 01:24 PM   #3 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 61
Leon112 is on a distinguished road
Default

Quote:
Originally Posted by dljeffery View Post
What exactly are you trying to do... are you trying to wrap text of arbitrary length? Or are you trying to just put multiple fixed length lines in a table view cell?

If it's the latter, just make your own custom cell with multiple UILabels placed however you'd like. If it's the former, well, I'd still make a custom cell, and put a UITextView in it.
the text is wrapped fine on multiple lines, but it doesnt look good.. all am trying to do is add a little bit of space between the lines within the cell...
to make it crystal clear.. i want to do something like this
http://ad3000.co.uk/blog/wp-content/...ne-spacing.JPG

its one paragraph, i cant have multiple labels.
Leon112 is offline   Reply With Quote
Old 07-11-2010, 01:36 PM   #4 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

It looks like if you want that sort of control, you would need to look into Core Text (or an even lower level, if you need to run on older iPhone OS releases). But that sounds like a whole lot of effort just to tweak some formatting in a table cell...
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 07-11-2010, 03:05 PM   #5 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 61
Leon112 is on a distinguished road
Default

it sounds small... but when you have a long paragraph with a big font size.. becomes annoying and too close to each other... is it that difficult? has any one done it before? any other alternatives?

many thanks in advance.
Leon112 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: 335
16 members and 319 guests
akphyo, alexP, appservice, cgokey, EXOPTENDAELAX, flamingliquid, guusleijsten, mariano_donati, ohmniac, Paul Slocum, PavelSea, SLIC, Sloshmonster, Sonuye857, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,653
Threads: 94,115
Posts: 402,888
Top Poster: BrianSlick (7,990)
Welcome to our newest member, ohmniac
Powered by vBadvanced CMPS v3.1.0

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