tags:

views:

45

answers:

2

Hi I am building an app and I have the main UINavigation view. I wanted to build another section into it, so when you hit a button, a new UI NavigationVIew pops up from the bottom. And when you have looked at a few views you can hit the cancel button at the top and the UINavigationView slides down and you are back at the original page in the UINavigation View where you hit that button.

I want to build something which functions similar to the Amazon shopping basket section in the Amazon App. Any ideas how to do that?

A: 

You want a modal view. check presentModalViewController method in UIViewController.

lukya
thanks. Found what I wanted with your help and it works perfectly!
Matthew Pateman
A: 

maybe something like this:

-(void)viewDidLoad {

if(isViewPushed == NO) {

self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel_Clicked:)] autorelease]; }

-(void) viewWillAppear:(BOOL)animated {

[super viewWillAppear:animated]; }

-(void) cancel_Clicked:(id)sender {

[self.navigationController dismissModalViewControllerAnimated:YES]; }

Josh