Change UINavigationBar Height

You can create a category class based on UINavigationBar like this

.h file

#import UIKit/UIKit.h    
@interface UINavigationBar (myNave)
- (CGSize)changeHeight:(CGSize)size;
@end

and .m file

#import "UINavigationBar+customNav.h"
@implementation UINavigationBar (customNav)
- (CGSize)sizeThatFits:(CGSize)size {
    CGSize newSize = CGSizeMake(320,100);
    return newSize;
}
@end

It works very nice.

Leave a Comment