Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the height of a toolbar in objective C?

I have this code in my applicationDidFinishLaunching:

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 have an effect on the UI. For example, if I set toolbarHidden to YES, it is certainly hidden. However, when I try to set the frame and customize the toolbar height, no change takes place. Does anyone know how to fix this?

like image 240
Tony Avatar asked Dec 19 '25 08:12

Tony


1 Answers

UIToolbars have a fixed height. You won't be able to change it.

like image 97
Alex Avatar answered Dec 21 '25 03:12

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!