views:

319

answers:

2

Hi,

In my application i have used the UiViewController and able to push the other view using the PushViewController. But, whenever i am using the presentModalViewController at that time i am not able to get whole functionality of the BackButton click event on the view which is working fine for the pushviewController.By using the debug i am able to reach at the function,but not able to execute the whole piece of code into that function.i have used below code.

[self.navigationController popViewControllerAnimated:YES]; [self.navigationController dismissModalViewControllerAnimated:YES];

But not able to get back to the push page.None of the lines effect is seen on the application.

Can any body give me any suggestion if i have done something unusual from transferring from PushviewController to presentModalViewController?

i just want the presentModalViewController in my application for some effect as horizontal or vertical.But,i am not able to see any effect of the event on that view.i am able to see the horizontal and vertical effect.

please guide me with proper resolution or any other solution which would be appreciated.

Thanks,

Mishal Shah.

+1  A: 

I don't think the navigationController property is set inside of your ModalViewController. So saying self.navigationController wouldn't work inside of your Modal View Controller. That is, if that's even where you put it, I don't really understand from the way you formatted your question.

If you want more help post some more code/format it better/start accepting more answers to your questions.

bpapa
thanks for reply.By using my presentmodalviewcontroller method,i am able to get the vertical or horizontal prestntview and able to see the view.but,that view has back button on.In back button event the method calls and which having different different piece of code like :[self.navigationController dismissModalViewControllerAnimated:YES]; Now there is no current effect of this dismissmodalViewController seen.Hoping that i have explained it properly.please give any resolution for this problem.Thanks
Mishal
+1  A: 

I think accepted practice is to dismiss the modal view controller from the view control in which you presented it. Use a notification to send a message back to the presenting controller and dismiss it there.

I think that is what you were asking, the question is somewhat unclear.

Eric
thanks for reply. By using my presentmodalviewcontroller method,i am able to get the vertical or horizontal prestntview and able to see the view.but,that view has back button on.In back button event the method calls and which having different different piece of code like : [self.navigationController dismissModalViewControllerAnimated:YES]; Now there is no current effect of this dismissmodalViewController seen. Hoping that i have explained it properly. please give any resolution for this problem. Thanks
Mishal