Created
August 31, 2011 17:38
-
-
Save Amosel/1184147 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
in the place where you init the navigationController: | |
fixer = [[AENavigationControllerDelegate alloc] init]; | |
navigationController.delegate = fixer; | |
*/ | |
@interface AENavigationControllerDelegate : NSObject <UINavigationControllerDelegate> | |
@end | |
@implementation AENavigationControllerDelegate | |
#define bgImageTag 143 | |
- (void)navigationController:(UINavigationController *)navigationController | |
didShowViewController:(UIViewController *)viewController | |
animated:(BOOL)animated | |
{ | |
UIImageView* imageView = (UIImageView*)[navigationController.navigationBar viewWithTag:bgImageTag]; | |
if(!imageView) | |
{ | |
UIImage *image = [UIImage imageNamed:@"header-logo-bg.png"]; | |
imageView = [[UIImageView alloc] initWithImage:image]; | |
imageView.tag = bgImageTag; | |
} | |
[navigationController.navigationBar insertSubview:imageView atIndex:0]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment