Christian
Christian

Reputation: 22343

Prototype Cells in UITableView not on top

It's really strange. The Prototype-Cell in my second UITableView isn't on top as it should be:

If I start moving it, than it's on top again, but after i drop it on my View, it is still in this strange way. How can I change that?

As you see, the first Cell is okay, but the second isn't.

enter image description here

Upvotes: 0

Views: 1275

Answers (1)

csotiriou
csotiriou

Reputation: 5780

Well, it's difficult to understand using only an image, but I will give you some possible causes for that:

  1. Have you applied a table header view by accident in the second table view? If you did, removing it will be the solution
  2. Have you applied the proper view constraints in the table view and its cells?

If I were you, I would not try to embed two UITableViews in the same view controller this way, especially since you use storyboards with iOS 7. What I would do is to use embed segues. Just drag a container view for each of your view table views, and connect their embed segues to their appropriate table view controllers ( you need to create in the storyboard those, two). That way, you can set the constraints much easier, separate the logic between the two and have a cleaner interface. You can do that and see if that helps.

Upvotes: 3

Related Questions