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-07-2010, 03:14 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Location: Norway
Posts: 49
teek is on a distinguished road
Default Custom UITableViewCell and size - again.

I've created a custom UITableViewCell in IB - all good, but WHY doesn't tableView set the cell height to the height of the cell as defined in IB ?
Do I really need to calculate this in heightForRowAtIndexPath:indexPath ? Shouldn't the size of the contentView be known to at least it's parent view ?
__________________
./t

Mac Mini 2,26GHz - 4 GB
iPhone 3GS - 32 GB :: iPod Touch - 16 GB :: iPod Shuffle - 4 GB
teek is offline   Reply With Quote
Old 08-07-2010, 10:23 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Long Beach, CA
Posts: 612
bytor99999 is on a distinguished road
Send a message via AIM to bytor99999 Send a message via Yahoo to bytor99999
Default

Nope, sorry. You have to do exactly what you wrote.

Because you might want to do things like create a big cell view in IB that might appear as different heights in the tableview. For instance, I create one that has three textfields on top of each other, and dependent on the data for that row in the table, I only have data to fill one textfield, so I only want the row to be 1/3 the normal height. If it was based on the height set in IB, then I wouldn't be able to do that, or I would have to change the frame in the cellView, which works, but, I really like the current approach, it is more flexible in allowing cool things to be done.

Mark
__________________
Perfect World Programming LLC
http://www.perfectworldprogramming.com

Please check out my apps.

TubeOrganizer
http://www.spritzlerapps.com/tube-organizer.html

Paper Clips
http://spritzlerapps.weebly.com/paper-clips.html
bytor99999 is offline   Reply With Quote
Old 08-07-2010, 10:27 AM   #3 (permalink)
"Sorry, but I dont know."
 
Join Date: Dec 2009
Location: Switzerland (CH)
Age: 16
Posts: 213
mavrick3 is on a distinguished road
Default

Maybe it's possible to set the height to the view.frame.height..?
mavrick3 is offline   Reply With Quote
Old 08-07-2010, 10:56 AM   #4 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Long Beach, CA
Posts: 612
bytor99999 is on a distinguished road
Send a message via AIM to bytor99999 Send a message via Yahoo to bytor99999
Default

Quote:
Originally Posted by mavrick3 View Post
Maybe it's possible to set the height to the view.frame.height..?
Yes you can, but you have to put it in between [tableview beginUpdates] and [tableview endUpdates]

But the original poster just wanted the table to take the row height given in Interface Builder for the nib of the UITableViewCell.

Mark
__________________
Perfect World Programming LLC
http://www.perfectworldprogramming.com

Please check out my apps.

TubeOrganizer
http://www.spritzlerapps.com/tube-organizer.html

Paper Clips
http://spritzlerapps.weebly.com/paper-clips.html
bytor99999 is offline   Reply With Quote
Old 08-08-2010, 02:31 AM   #5 (permalink)
Registered Member
 
Join Date: Mar 2010
Location: Norway
Posts: 49
teek is on a distinguished road
Default

Ok that makes perfect sense. Thanks for the answer :-)
__________________
./t

Mac Mini 2,26GHz - 4 GB
iPhone 3GS - 32 GB :: iPod Touch - 16 GB :: iPod Shuffle - 4 GB
teek 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: 310
11 members and 299 guests
alexP, arash5500, gordo26, HemiMG, linkmx, mediaspree, nobstudio, Objective Zero, Sloshmonster, stanny, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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