hi,
i have this at my appdelegate:
for 1st app:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:rootController.view];
[window makeKeyAndVisible];
}
this will display a navigation and tabar display for my app.
ok no problem here.
next i have this from another app:
- (void) applicationDidFinishLaunching:(UIApplication *)application {
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MainViewController *_mainViewController = [[MainViewController alloc] init];
UINavigationController *_navigationController = [[UINavigationController alloc] initWithRootViewController:_mainViewController];
[_window addSubview:_navigationController.view];
[_window makeKeyAndVisible];
}
which also works fine.
now, how can i include all this function into my 1st app? i would like to use it for one of my tab options.
i've tried:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
Tab4 *_mainViewController = [[Tab4 alloc] init];
UINavigationController *_navigationController = [[UINavigationController alloc] initWithRootViewController:_mainViewController];
[window addSubview:_navigationController.view];
[window addSubview:rootController.view];
[window makeKeyAndVisible];
}
sort of combining the two. there is no compiling error but the program is not working. i got it wrong somewhere and stuck. is it possible to have 2 subivew? any help is greatly appreciated. thks.
hi,
i've embedded the a nav controller in my tab bar. but doing this does it "replace" the code completely?
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MainViewController *_mainViewController = [[MainViewController alloc] init];
UINavigationController *_navigationController = [[UINavigationController alloc] initWithRootViewController:_mainViewController];
[_window addSubview:_navigationController.view];
[_window makeKeyAndVisible];
tab view gets load up fine but it is unable to receive a notification. thks