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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…