I have a TabBar Controller in AppDelegate and then Navigation Controller on TabBar. But i get problem when i push Navigation Controller to other View Controller while remaining on first tabItem of TabBar.
My AppDelegate.h is:
@interface IlmStreamAppDelegate : NSObject <UIApplicationDelegate,UINavigationControllerDelegate,UINavigationControllerDelegate>
{
UIWindow *window;
UITabBarController *rootViewController;
UINavigationController *_navController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *rootViewController;
@property (nonatomic, retain) UINavigationController *navController;
@end
My AppDelegate.m is:
#import "IlmStreamAppDelegate.h"
@implementation IlmStreamAppDelegate
@synthesize window;
@synthesize rootViewController;
@synthesize navController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[rootViewController setTitle:@"Categories"];
_navController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
[window addSubview:_navController.view];
[self.window makeKeyAndVisible];
return YES;
}
@end