How to prevent subview capture from overlapping tab bar?

I have a view with a tab bar below. This view is hovering over the navigation controller, so there is also a navigation bar at the top. From this point of view, I would like to show the table view that I create from my own nib. When I add this view as a subtitle, it overlaps the tab bar.

Is there a way to do this preview automatically by resizing to the free space between the top and bottom panels?

If not, what is the β€œright” way to adjust its size?

-Vegar

+4
source share
1 answer

In the interface builder, make sure that you set the scroll bar navigation and tabs. This should be the first list of options on the first tab in the property view of the interface builder. This will force your view to simulate the amount of space that it has when loading into the view.

From there, you can also select a preview video option. The interface designer also allows you to set the resizing options for the view. If subview your addition was not created in the interface builder, you will need to specify these parameters manually.

Lastly, make sure that you add the preview to the correct view, not the tab bar controller or navigation controller.

It’s best to make sure that subview your padding sizes are suitable for the amount of space created with CGRect.

+5
source

Source: https://habr.com/ru/post/1301512/


All Articles