I am looking to get the translucency and color of the iOS 10 watch navigation bar. I managed the color by color picking the RGB but I cannot figure out the translucency. I a
If you mean you want to get rid of translucent effect, just
navigationController?.navigationBar.isTranslucent = false
Just click on the navigation bar, and in attribute inspector, you'll find it.
Use below method to achieve navigationBar translucent effect
. When UIContentView
scrolls as the picture you posted.
In viewDidLoad:
view.backgroundColor = UIColor.black
navigationController?.navigationBar.barStyle = UIBarStyle.blackTranslucent
navigationController?.navigationBar.tintColor = UIColor.white
Updated
Output:
Note:
Screen recording is not showing the real result.I recommend you to test the code in a real device.
You can use the same method. If you developing tabBar
based project.