How to set toolbar height in lens C?

I have this code in applicationDidFinishLaunching application:

navController.toolbarHidden = NO;
[navController toolbar].tintColor = [UIColor darkGrayColor];
[[navController toolbar] setFrame:CGRectMake(0.0,0.0,320.0,180.0)];

The first two lines definitely affect the user interface. For example, if I set toolbarHidden to YES, it is certainly hidden. However, when I try to set the frame and adjust the height of the toolbar, no changes occur. Does anyone know how to fix this?

+3
source share
3 answers

UIToolbarhave a fixed height. You cannot change it.

+5
source

You must create your own toolbar class if you need one with adjustable height.

+1
source

, frame . UINavigationController .

0
source

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


All Articles