I have set a background image slightly bigger than the navigationBar.The image is 55px in height.[I want a banner looking image with ribbon at the bottom of nav bar] It was working ok in iOS6. But in iOS7, its getting clipped by itself. I tried setting [self.navigationController.navigationBar setClipsToBounds:NO];
It's still getting clipped. Can't I have a bigger background image without getting clipped?
this is due to Ui navigation bar is 64 point in ios7 that why this create problem. refer this link https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/Bars.html refer table 5-1 that is give you idea that for resizable image what are the change in new ios7
you can use UIBarPositioning propety to solve your problem not sure but that may help you refer this link for more info related to UIBarPositioning
Edited also try by set this flag navigationBar.translucent = NO;
for more info refer this link iOS 7 UINavigationBar - UIView layout issue
The image is not getting clipped, it is most probably just too small. The UINavigationBar is 64 points in iOS 7, so the 55px image will be too small, especially considering the retina resolution where 128px would be needed.
set the delegate of your navigation bar to your view controller, and return UIBarPositionTopAttached
in delegate method. return the position which you want to see
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.