-
-
Save aprato/6631390 to your computer and use it in GitHub Desktop.
Thanks, great solution! Whenever I go into a subview or scroll the current view, though, the opacity seems to change after about 1 second. Is it supposed to do that? If so, how can I disable it?
https://gist.github.com/j-mcnally/6987297
I didnt want to have to go over every single class and change the subclass so i went with the swizzing approach, id love if someone wanted to implement this to the original spec, its late and i only need it to be one color and one opacity ever, but wanted to get thoughts about potential pitfalls.
This fails when the device is rotated to landscape orientation. Instead of computing spaceAboveBar
from the bar's frame, its better to get the status bar's height directly using CGRectGetHeight([[UIApplication sharedApplication] statusBarFrame])
. Fork here: https://gist.github.com/chaitanyagupta/7024530
check the new comment, 7.0.3 changed things again. I'm only using the backing layer pre 7.0.3. For everything later a color with an alpha (I'm using .91 on blackColor) seems to be a better approach.
Nice work. Trying to figure out how to get this to work with UINavigationControllers created in a Storyboard. Not sure it's possible.
Your subclass of UINavigationController will have:
called when the subclass is created, but you don't have the opportunity to set the UINavigationBar at that time.