tags:

views:

167

answers:

1

I'm trying to place a branding bar (320x22) above the UINavigationBar in a UINavigationController.

Has anyone been successful in doing so? I know many applications already do it, but I wanted to get some ideas on how to accomplish this.

I tried:

  1. Creating a UINavigationBar category and overriding the drawRect method.
  2. Placing the UINavigationController inside a UIViewController.
  3. Moving the nav bar in viewWillAppear (then if i present modal the nav bar pops back into place forcing me to use viewDidAppear which actually shows the navbar moving down again...)

Anyone out there have any better ideas?

Thanks!

+1  A: 

Create a view and add the branding bar and the navigation controller's view as subviews. Set the navigation controller's view's frame to underneath the branding bar.

Jeff Kelley
Thanks that works well...the issue remains that if you present a modal and go back the entire nav controller gets shifted up, but i'm willing to live with resetting the frame down.Thomson Reuters app does the same thing actually....
Felix Khazin