- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSError *error = nil;
NSString *username = [[NSUserDefaults standardUserDefaults] objectForKey:@"username"];
NSString *str = [SFHFKeychainUtils getPasswordForUsername:username andServiceName:@"mybibleapp" error:&error];
NSLog(@"previous un");
NSLog(@"%@", str);
if(str != nil)
{
main_page *detailViewController = [[main_page alloc] initWithNibName:@"main_page" bundle:nil];
// Pass the selected object to the new view controller.
// detailViewController.localStringtextnote = localStringtextnote;
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
}
When I put this code for navigating to main_page it shows an error that property navigationController not found on object of appdelegate so i put this code insted of the above
main_page *log = [[main_page alloc] initWithNibName:@"main_page" bundle:nil];
[window addSubview:tabController.view];
[window addSubview:log.view];
[window makeKeyAndVisible];
the page is redirected to main_page but nothing is working in this way. no navigation in main_page is working, I cant redirect any page from the main_page. So what can I do to solve these errors.
You can create a “proxy” viewController without nib which is loaded in MainWindow’s navigationController and then do something like the following, in the proxy’s viewDidLoad