user198725878
user198725878

Reputation: 6386

How to dismiss the view

I have used the below code to show the view with partial curl effect. And it works fine but I want to know that how can i dismiss the popoverViewController when touching the curl effect as like in the map application in the iphone.

thanks for any help

 UINavigationController *navPop = [[UINavigationController alloc] initWithRootViewController:popoverViewController] ;
    [popoverViewController release];

[popoverViewController setModalTransitionStyle:UIModalTransitionStylePartialCurl];


    [self presentModalViewController:navPop animated:YES];

actually i know the code to dismiss the view but , wat i need to know is i want to dismisss it by clicking on the curl effect.. this is wat i would like to know

Upvotes: 0

Views: 522

Answers (2)

Nekto
Nekto

Reputation: 17877

You are setting modalTransitionStyle of wrong object, I guess. As you are presenting navPop you should set the property to it:

[navPop setModalTransitionStyle:UIModalTransitionStylePartialCurl];

When you would like to dismiss it, just call:

[navPop dismissModalViewControllerAnimated:YES];

And you will see curl effect

Upvotes: 1

Stephen Darlington
Stephen Darlington

Reputation: 52565

Use the dismissModalViewControllerAnimated: method.

Upvotes: 1

Related Questions