Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-13-2009, 12:43 PM   #1 (permalink)
mrbelk
Registered Member
 
Join Date: Feb 2009
Posts: 34
Default Question about UITableViewCell and grouped tables

OK, so I am making reasonable progress on my app, but have experienced some very strange behavior populating a UITableView with 3 sections. I should mention that I have created custom UITableViewCell views in IB and am using a table view cell factory to instantiate table cells (ala. this post: Using UITableViewCell with InterfaceBuilder « Agile Developer, Berlin, Germany)

In the top section, I have one cell with some "header" information that includes a UIImageView and some labels. in the cellForRowAtIndexPath delegate method, I get data from my model and set the text of the labels and set the image data for the UIImageView. The label text is set correctly, but when the table is rendered, the UIImageView is shifted down and to the right from where it is declared to be in IB, obscuring some of the labels in that cell.

In the second section of the table, I have a single cell with a UILabel and a UIButton. For the life of me, I cannot get the label and button text to reflect the assignments made in the cellForRowAtIndexPath delegate method. The text rendered in the simulator is the same "place holder" text that you set in IB. The text getting assigned to the label and button is correct; I have verified this in the debugger. Are there any special release/retain considerations when using the [NSString stringWithFormat:] method?

In the 3rd section, I have a list of cells that include a UIImageView and 2 labels. In these cells, the label texts are set correctly.

What could be the reason for the image shift and the label text?

Thanks,
-MrB
mrbelk is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,130
Threads: 38,899
Posts: 170,662
Top Poster: smasher (2,565)
Welcome to our newest member, HunBirk427
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:41 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.