Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-30-2011, 11:15 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
Dhotiwalla is on a distinguished road
Default detailViewController.navigationController is always nil

Hi,

Using Xcode 4.x I created a SplitView project for iPad

From RootViewController I'm trying to display a TableView inside detailView by doing this:

[detailViewController.navigationController pushViewController:slc animated:YES];

This does not work for me and upon investigation I find that detailViewController.navigationController is always nil

I don't know why this is nil.

appreciate any help I can get

thanks Dhoti
Dhotiwalla is offline   Reply With Quote
Old 06-30-2011, 01:58 PM   #2 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

Did you set it up with a navigation controller?
Domele is offline   Reply With Quote
Old 06-30-2011, 02:54 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
Dhotiwalla is on a distinguished road
Default detailViewController.navigationController is always nil

Quote:
Originally Posted by Domele View Post
Did you set it up with a navigation controller?
Good question.

Since RootViewController.navigationController is automagically set by Xcode, I was under the impression this was also the case with DetailViewController.navigationController. Going through the source I don't see any code that specifically sets up RootViewController.navigationController.

How do I setup navigationController? I'm a newbie and sure appreciate your help.

thanks
Dhoti
Dhotiwalla is offline   Reply With Quote
Old 06-30-2011, 03:18 PM   #4 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

UISplitViewController, MultipleDetailViews with Navigation Controller | Kshitiz Ghimire
Domele is offline   Reply With Quote
Old 07-02-2011, 10:20 PM   #5 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
Dhotiwalla is on a distinguished road
Default

Thanks Domele for your responses and patience.

I tried out the link you gave me and and being a newbie to IOS I had a hard time figuring it out.

I created a new SplitViewController project using xcode. Then, in RootViewController.h I added
Code:
@property (nonatomic, retain) UINavigationController *detailNav;
And in RootViewController.m I added
Code:
@synthesize detailNav;

- (void)viewDidLoad
{
	if (detailNav == nil) {
		detailNav = [[UINavigationController alloc] initWithRootViewController:detailViewController];
	}
	
	ServerListTableViewController *sl = [[ServerListTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
        // this does not work for me; my table is not displayed in detailview
	[detailNav pushViewController:sl animated:YES];

        // this displays the table in the rootViewControler - just to check -
	[self.navigationController pushViewController:sl animated:YES];
}
I'm unable to figure out what my table is not being displayed in detailView.

thanks so much for your help
Dhoti
Dhotiwalla is offline   Reply With Quote
Old 07-03-2011, 03:08 AM   #6 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

You are supposed to set both view controllers for UISplitViewController in the app delegate. Try this tutorial, it's more detailed: iPad for iPhone Developers 101: UISplitView Tutorial | Ray Wenderlich
Domele is offline   Reply With Quote
Old 07-04-2011, 09:46 PM   #7 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
Dhotiwalla is on a distinguished road
Default

Quote:
Originally Posted by Domele View Post
You are supposed to set both view controllers for UISplitViewController in the app delegate. Try this tutorial, it's more detailed: iPad for iPhone Developers 101: UISplitView Tutorial | Ray Wenderlich
Thanks Domele, I finally got it working. All I had to do was drag and drop a UINavigationController into DetailViewController

Dhoti
Dhotiwalla is offline   Reply With Quote
Reply

Bookmarks

Tags
uinavigationcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 339
9 members and 330 guests
apatsufas, chemistry, lendo, leostc, Leslie80, lzwasyc, MarkC, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:32 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0