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
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.
Um, because it's modal? The whole idea behind a modal view is that it prevents you from doing anything except whatever it is that it wants you to do. It puts you in a 'mode'. It will usually have an ok button or cancel and ok buttons. You must do something specific to exit the modal state.
The nav bar is more flexible and doesn't require you to do a specific action before exiting to another view.
The modal view covers up the nav bar to create the mode.
Just drag the navbar over your view. Add barbutton items accordingly. If you're not seeing it then it's not on a view or is behind the view. Check the outline view for order of display.
With this I do see a Navbar, but no buttons. Well in the sample the anotherViewController seems to add the buttons programmatically in the ViewDidLoad function. But why does it not pick up the buttons I created in my XIB?
So is it true that I need to initWithRootViewController if I want presentModal and I don't need it with the pushViewController? Why?
regards
Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
You're making this much more difficult than it needs to be. Create 2 view controllers. Within a method for your master view controller load the other and just present it from the master view controller.
Replies
The nav bar is more flexible and doesn't require you to do a specific action before exiting to another view.
The modal view covers up the nav bar to create the mode.
Choose one or the other based on your need.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeOliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
Linguan makes
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAnotherViewController *controller = [self anotherViewController];
controller.editedWish = nil;
if (addNavigationController == nil) {
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller];
self.addNavigationController = navController;
[navController release];
}
[self.navigationController presentModalViewController:controller animated:YES];
With this I do see a Navbar, but no buttons. Well in the sample the anotherViewController seems to add the buttons programmatically in the ViewDidLoad function. But why does it not pick up the buttons I created in my XIB?
So is it true that I need to initWithRootViewController if I want presentModal and I don't need it with the pushViewController? Why?
Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
Linguan makes
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeCreate 2 view controllers.
Within a method for your master view controller load the other and just present it from the master view controller.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeOr can I use just one xib?
Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
Linguan makes
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome