I suppose it\'s not strictly in line with Apple guidelines but I guess it must be possible somehow. I\'d like to change the height of navigation bar inside UINavigationContr
static CGFloat const CustomNavigationBarHeight = 74;
@implementation WTNavigationBar
- (CGSize)sizeThatFits:(CGSize)size{
size.width = 1024;
size.height = CustomNavigationBarHeight;
return size;
}
-(void)layoutSubviews {
[super layoutSubviews];
for (UIView *view in self.subviews) {
SFLog(@"view.class=%@",[view class]);
if ([view isKindOfClass:NSClassFromString(@"UINavigationItemButtonView")]) {
float centerY = self.bounds.size.height / 2.0f;
CGPoint center = view.center;
center.y = centerY;
view.center = center;
}
}
}
@end
in my iPad app,which has a fixed landscape orientation,I found I have to hardcode the size's width