UINavigationController changes the position of the pressed view of the UIViewController

I tried to solve it in different ways, but always failed.

Basically what I need is a NavigationController with a customizable navigation bar (different heights and a smaller return button), which I have already reached.

This creates two problems. If I use the default navigation navigation for the NavigationController, I have a smaller NavigationBar, but the views of the movable ViewControllers are still as if the NavBar would be of normal height. If, on the other hand, I use my own created NavBar and hide the default value, and then present the pressed position of the ViewControllers, as if I would not have a NavBar at all. I do not know where to set the view frame. No matter where I try to install them, this will not work.

Is there any strategy without implementing my own NavigationController from scratch?

Do not use nib, dev files for iphone OS 4.0, but will return to iphone OS 3 soon.

+3
source share
1 answer

Try using your own custom navigation controller and set the pushed view frame in your method ViewWillAppear.

Hiding a regular navigation controller will create problems. It is better NOT to use it fully if you are not going to use it. But after that you will have to use your custom navigation controller in the project anywhere.

0
source

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


All Articles