Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I have a prototype cell that contains a UILabel. I set the values of the UILabels of each cell that is created using this prototype in my view controller's cellForRowAtIndexPath method. When I run the app, there is just one cell (out of 3) that doesn't show any text. I checked the debugger and saw that the text property was set to a non-nil value.

I must point out that I changed the maximum # of lines in the UILabel to 1, but that should have had no effect.

I have done some research, and so far have only found threads that point to one of two causes - use of a worker thread to execute setText, and use of an incompatible font - but neither are what's causing my problem.

Edit: I think I should point out that the label is linked to an IBOutlet named "textLabel".
 
Have you set the number of rows in the table view delegate numberOfRowsInSection?

In cellForRowAtIndexPath, are you creating the cell with cellWithIdentifier then editing the property of the cell or doing self.textLabel.text = myArray[indexPath.Row]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.