I have created a custom navigation controller in appDelegate :
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
poemsView = [[[PoemsViewController alloc]initWithNibName:@"PoemsViewController" bundle:nil] autorelease];
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:poemsView] autorelease];
self.navigationController.navigationBarHidden = YES;
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
so the problem is I need my app lunches from viewController , but if I set my viewController as rootviewController , my navigation controller does not push navigation and vice versa , if set my navigation controller as a root , app does not load from menus or main view controller .
Why you Creating Poemsview as rootviewcontroller of Navigation Controller ?
if You Want To Load ViewController First Then use the following Code.
You Can Create Another Navigation Controller as a
Sub-class of Viewcontroller.In your Poem Button Action Add The Following :
Now You can be able push To detail View from Your
tableview DidselectRowAtindexpath.