UITableViewController first cell under Navigation bar

I have a tableview controller which shows custom cells in a table view. However, the first cell appears under navigation bar. I tried this solution but it didn't work.


Any help?

Accepted Reply

Hi,


I was able to solve this problem at last. There were auto-layout warnings in the cell's xib. I selected fix replacement for all subview and now its working fine.

Replies

here is how my tableview looks...

https://photos.app.goo.gl/eK4eKJsAE81ghNTy9


I remade the custom cell and now here is how it loads. they no longer overlap but i just see blue and grey rectangles in the tableviw cells.


https://photos.app.goo.gl/eK4eKJsAE81ghNTy9

an update... cleaning build problem and deleting app from device makes problem 2 vanish and problem 1 reappear. cells are overlapping and first row is under navigation bar in tableview controller.

What are problems 1 and 2 ?


I have a similar set up:

- vanController

- leads to TableViewController


The first row appears correctly below the nav bar, not hidden under.


Some setup details:

- navigation is set to automatic

- cells are custom

I have posted two links of google photos that have screenshots.

i have still not resolved this issue. cells still overlap and the first one is under the nav bar.


please help.

I have posted two links of google photos that have screenshots.

Yes I saw it. But without complete code, very hard to say.


Do you want to publish the code somewhere or post a mail address for a momement here so that we can contact there ?

What part of the code do you need? The cide in the custom cells class? There are only IBOutlets in there. They are referenced from the viewcontroller to show data (which interestingly is not showing up).

The goal would be able to run the code and look if it's happening here and, if so, find the cause. It is difficult without code and complete project setting (problem may come from storyboard set up as well).


But if you cannot post the code or post email, too bad.

Hi,


I was able to solve this problem at last. There were auto-layout warnings in the cell's xib. I selected fix replacement for all subview and now its working fine.

That was my guess : problem may come from storyboard set up as well


It is useless to post such question if you don't show the code or do not tell all error / warnings you get. It is difficult to imagine you got those warnings but just ignored them !


Think about this next time.


have a good day and good continuation.

Another problem was that tye preview device size was different from size of device being tested upon.