Question

I am having a weird issue where my custom cell labels show up in what would be the correct position, but the custom cells otherwise are not loading. I am creating a Universal app, and my iPhone and iPad share all code but the storyboards. The iPhone version works fine.

Here is a picture of the custom cell: enter image description here

And here is what it looks like on the iPad when I run it: enter image description here

I have recreated the TableViewController from scratch, the cells from scratch, rehooked everything up, and triple checked again and again. The class is assigned (obviously because the labels change), and it all looks swell.

Like I said, the identical setup works just fine on the iPhone storyboard.

Notice the small Discloser Indicator on the top cell. The segue works from the top line there, as it should.

Why is it creating this weird layout? Thanks!

Was it helpful?

Solution

I think you'll have to implement either the delegate method tableView:heightForRowAtIndexPath: or setting the rowHeight property on the tableView as explained here.

As to why it works on iPhone, perhaps it just happens to be a good size. Apple docs for rowHeight state:

If you do not explicitly set the row height, UITableView sets it to a standard value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top