WebOrCode WebOrCode - 3 months ago 12
iOS Question

How can to go back to previous view programmatically without UINavigationController?

How can to go back to previous view programmatically without

UINavigationController
, because all examples that I have found use
UINavigationController
?

I am making view for sending feedback and I would like to use this view in many more apps.

If I use UINavigationController than app need to have
UINavigationController
to use my view for sending feedback.

Is this possible to do and how ?

This is code how I show my view for sending feedback:

- (IBAction)showFeedbackView:(id)sender {

WOC_FeedbackViewController *feedbackView = [[WOC_FeedbackViewController alloc] init];

[self presentViewController:feedbackView animated:YES completion:nil];
}

Answer

use this u can go back

[self dismissViewControllerAnimated:YES completion:nil];
Comments