2

i have a modal view,on that i placed a button By clicking on that button.,i should navigate to another view

I have tried many times but not getting push-view in modal view,

i am a beginner in iOS,please don't discourage me

  • Take a look here : http://stackoverflow.com/questions/3479231/modal-view-with-navigation-controller – Ali Abbas Nov 14 '12 at 16:31
  • now i cannot...i am not in college now i just presented viewcontroller2 asa modal view to viewcontroller1,now i want to navigate to viewcontroller3 from viewcontroller2(modalView) –  Nov 14 '12 at 16:32
  • You should exercise some patience and post a properly formed question with your code - just because you want an answer "now" doesn't mean that you shouldn't put some effort into asking – Caribou Nov 14 '12 at 16:41

2 Answers2

0

This is the code.....

-(IBAction)post:(id)sender{

PhotoDetailViewController *addController = [[PhotoDetailViewController alloc] initWithNibName:@"PhotoDetailViewController" bundle:nil];

 UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addController];


 [self presentModalViewController:navigationController animated:YES];

}

"post" is button on the present modalview,when i click that..it should be navigated to PhotoDetailController,How to do that

NB: posting from my friend's account......Jishil KP

Nithin M Keloth
  • 1,595
  • 1
  • 20
  • 37
-1

@Jishil KP, Push is not a property of modal view,which can only be presented or dismiss. If u wanta push effect,then use navigationcontroller.

rehan
  • 141
  • 1
  • 2
  • 9