Umair_uas
Umair_uas

Reputation: 673

Present model view is not work with uinavigation controller

i am using navigation based app. i am using push pop for switching view. But when i desire to use present model view controller in order to slide up view..then push pop not work properly? How can i slideup my view/

Upvotes: 0

Views: 3329

Answers (3)

Maffo
Maffo

Reputation: 1465

You have to use the navigationController instance not the View inside.

[self.navigationController presentModalViewController:proView animated:YES];

Upvotes: 2

DavidM
DavidM

Reputation: 548

This might help...

Custom Animation for Pushing a UIViewController

Just implement a custom animation something like:

_view.frame = CGRectMake(0, 480, _view.frame.size.width, _view.frame.size.height);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];

_view.frame = CGRectMake(0, 0, _view.frame.size.width, _view.frame.size.height);

[UIView commitAnimations];

Upvotes: 0

Joetjah
Joetjah

Reputation: 6132

If I'm not mistaken, the present modal viewer can't be combined with a navigation controller. The present modal viewer is build to do exactly what you want, while the push/pop method gives an easy navigation controller creation...

Upvotes: -1

Related Questions