It will work if you place your navigation appearance items in your mainVC's init method, and also in your ViewWillAppear, like this:
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self==nil)
return nil;
[[[self navigationController] navigationBar] setTranslucent:YES];
[[[self navigationController ] navigationBar] setBarTintColor:[UIColor clearColor]];
return self;
}
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[[[self navigationController] navigationBar] setTranslucent:YES];
[[[self navigationController ] navigationBar] setBarTintColor:[UIColor clearColor]];
}
No need to set up anything else, just keep it all in your mainVC's implementation file, and it will work, good luck. Oh yes, and on another note, here's why this works:
ViewDidLoad is going to be called a single time in the navigation stack until it's popped off the stack, so you initialize the view controller with the attributes you want for it's navigation controller, you can do this with each viewcontroller to control the navigaiotnbar's view. Putting this in the init method set its up with this before the view is loaded on the screen, and then putting this in your viewWillAppear sets it up so that when you transition from view controller to view controller on the stack, assuming this view controller is still on the stack, the viewWillAppear will change the navigationbar back to the styling you want given. So, the first time that this view controller is loaded onto the stack, the navigaiton bar styling will happen two times, no big deal, but from then on out, it will only happen one time when it is appearing again while on the navigation stack.