Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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];
}
like image 802
WebOrCode Avatar asked Jan 11 '23 14:01

WebOrCode


1 Answers

Use this to go back

[self dismissViewControllerAnimated:YES completion:nil];
like image 53
ChandreshKanetiya Avatar answered Jan 19 '23 09:01

ChandreshKanetiya