After adding a top navigation bar for customization of the camera overlay at here. Now I am trying to go back to the previous screen by adding an action to the back button. What I am doing is
-(IBAction)backButton:(id)sender {
NSLog(@"back button is clicked"); [self dismissModalViewControllerAnimated:YES];}
However, the transition is no executed even though the console shows
back button is clicked
I also try
[self popToRootViewControllerAnimated:YES]
However,it does not work either
Have you encountered this issue before, please advice me about it. Thanks
PS : I dont wanna use the cancel button built-in controls (when showsZBarControls=YES )
I assume the controller you are sending this message to is a modal view controller. You have to send
to the actual modal view controller. So it will look like this
Or you could add this code to your modal view controller
This code implies that you have knowledge of your modal view controller in the previous view. You might look into adding these view controllers into a UINavigationController so all this would be taken care of.