I did add a toolbar to my UINavigationController and that works as it should. But I don't see any possibility to change the appearance(like other backgroundcolor etc.) of the toolbar.
The docs shows me that an UINavigationController has a toolbar property but it is readonly.
Do I have to do an custom UIView or is there any other given way?
cheers cyril
While the toolbar property itself may be readonly, it's properties are as they are normally.
The toolbar being readonly means that you can't set a different instance of a toolbar for that property. The toolbars properties, such as it's barStyle
are readwrite and are modifiable.
Simply call:
myNavController.toolbar.barStyle = UIBarStyleBlackOpaque; // exchange this style constant for whatever you want to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With