1

If you take a look at the Prezi iPad App, their navBar is bigger than the standard one. Does anyone know how to accomplish that?

Thanks in advance

Matteo Alessani
  • 10,094
  • 4
  • 39
  • 56
Faser
  • 1,216
  • 18
  • 35

1 Answers1

3

You need to subclass the UINavigationBar:

@interface MyNavigationBar : UINavigationBar

@end

@implementation MyNavigationBar

- (void)drawRect:(CGRect)rect {
  [image drawInRect:CGRectMake(0, 0, 320, 65)];
}

@end

Then you need to create a Category for the UINavigationBar to use the subclass:

@implementation UINavigationBar (CustomImage)

//for iOS 5 
+ (Class)class {
  return NSClassFromString(@"MyNavigationBar");
}

- (void)layoutSubviews {
  [super layoutSubviews];
  self.frame = CGRectMake(0, 0, 320, 65);
}

@end
Matteo Alessani
  • 10,094
  • 4
  • 39
  • 56