Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

pushViewController versus presentModalViewController

Oliver DrobnikOliver Drobnik Posts: 537New Users, Registered Users
Hi,

can anyone explain what the difference is between PushViewController and presentModalViewController?

iside a navigation view controller:


AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];


[self pushViewController:anotherViewController animated:YES];

versus

[self presentModalViewController:anotherViewController animated:YES];


gives a different result. With the first I see the Navigation bar updated according to what I set in the XIB. With the second the window slides in from below, but is missing a navigation bar.

my anotherView XIB consists of the following:

File's Owner
First Responder
View
Navigation Bar
Navigation Item
Bar Button


I am looking at the SQL Books sample and there the same XIB is used. For Editing the view slides in from the right. For adding it slides in from below. I don't see why the modal version would not show the navigation bar ...
Post edited by Oliver Drobnik on
regards



Oliver Drobnik

Cocoanetics - Our DNA is programmed in Objective-C.



Linguan – makes

Replies

Sign In or Register to comment.