I have 4 UITableViewController in a UITabBarController. They all use the same UITableViewController class, but on the 3 last controllers, the tableView is not correctly displayed : the top of the tableView is displayed under the navigationBar whereas the first is correctly displayed
I try to solve the problem by setting programmatically the tableView contentInset in "MCVigilanceSingleColorViewController" class (inherited from UITableViewController), but it is applied to my four controllers (then the tableView of my first UITableViewController has now a wrong frame...).
In the storyboard, my 4 UITableViewController use the same class too, and they are all the same : my 4 ViewControllers are exactly the same. The 2nd, 3th and 4th controllers are a "copy/paste" from the first (I just changed the barItemText). Then they all have the same options checked and unchecked. By the way, checking the option "underTopBard" have no effect on my displayed controllers. I juste don't understand why they are displayed differently.
Cay you help me please ? Thx.
Embedding the UITableViewController in a UINavigationController fixes this issue for me. This is pretty easy from the Storyboard. Just select the UITableViewController, then go to Editor > Embed In > Navigation Controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With