Broken cell with odd strikethrough?

I'm having a weird issue with a specific UITableView in my iPhone experience. If you look at the following screenshot:

alt text http://dl-client.getdropbox.com/u/57676/brokencell.png

you will notice a hit through the middle of the Jane Aba cell.

Any idea what might be causing this odd graphical display? This is true for both the simulator and the real device with the 2.2 SDK.

As requested, here's my method -tableView:cellForRowIndexPath:

:

* EDIT *

I found the problem. I'm not really sure why this is a problem, but it is. In my RootViewController, I have the following line of code in my method -initWithCoder:

:

self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

      

When I comment this out, the cell (which is not in the RootViewController, but the secondary controller) it resolved. Any idea why this might be the case?

+1


source to share


3 answers


I had a similar problem. For me, the only line was caused by a redundant view that was created but was never sized or placed correctly and thus was 1 pixel high floating above everything else. You can also call this by obfuscating the UINavigationController about your set of subviews (by adding views directly to your layout container).



Review your user interface (xib files and programmatically generated views) for a view that shouldn't be there or otherwise not used. It might be helpful to write some code to dump the UI hierarchy so you can see what the views are.

+1


source


Are you doing anything special in your -tableView: heightForRowAtIndexPath: method?



It seems to me that the row height is not set correctly, so the content of the cell expands beyond its borders.

0


source


The problem goes away when you set the cell height for the table view to 1 pixel in IB. It seems that before filling the table, the empty table is drawn with the outlines of the cell height set to IB. Don't set cell height to 0. IB don't like it. :-)

0


source







All Articles