When you add a TableViewController to the ViewController container view (connected by Embedded in Segue), the status bar and navigation bar are blank at the top.
That's why I changed the container view area to the bottom of the navigation bar to cover all ViewController views.
However, if you display another TableViewController view in the container view, there will be no space at the top and it will overlap with the bar as shown in the picture below.
I'd like to make ViewController a container view and switch between two TableViewControllers, but how can I change the settings to create a gap at the top?
ios uitableview
I was able to solve this problem by referring to the answers here.
in the container view controller viewDidLoad
self.automaticallyAdjustsScrollViewInsets=NO;
can be set to clear the space.
© 2024 OneMinuteCode. All rights reserved.