I have created a custom navigation bar in ipad with height of 80. In this case there occurs an issue with bask buttons frame.
The height of navigation bar increased but the back button's height is same as before with height os navigation bar as 44. here the navigation bar heigh increases to 80 so accordingly i want to change the frame of back button also.
I know we can add a custom back button but i dnt want to create 15 image for 15 view with name of each screen. i want to change frame of default back buttons.
here is my code to customise navigation bar
#import "UINavigationBar+navbar.h"
@implementation UINavigationBar (navbar)
- (CGSize)sizeThatFits:(CGSize)size {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
CGSize newSize = CGSizeMake(self.frame.size.width,44);
return newSize;
}
else{
CGSize newSize = CGSizeMake(self.frame.size.width,80);
return newSize;
}
}