andreamazz / SlideOutNavigation

SlideOut Navigation Controller for iOS.
MIT License
210 stars 49 forks source link

Translucent navigation bar in iOS 7 #64

Closed mehfuzh closed 10 years ago

mehfuzh commented 10 years ago

Due to new behavior iOS 7 the following line AMSlideoutNavigationController.m adds extra padding.

self.contentController.navigationBar.translucent = YES;

/ New behavior on iOS 7. Default is YES. You may force an opaque background by setting the property to NO. If the navigation bar has a custom background image, the default is inferred from the alpha values of the image—YES if it has any pixel with alpha < 1.0 If you send setTranslucent:YES to a bar with an opaque custom background image it will apply a system opacity less than 1.0 to the image. If you send setTranslucent:NO to a bar with a translucent custom background image it will provide an opaque background for the image using the bar's barTintColor if defined, or black for UIBarStyleBlack or white for UIBarStyleDefault if barTintColor is nil. /

andreamazz commented 10 years ago

Should be fixed in commit ffd6f4d I added a new option to enable the translucency. This also sets the controller's edgeForExtendedLayout, preventing the view from going under the navbar.