Question

I have a view that contains a ECSlidingView: The view, containing a slider (appears on the left when clicking the hamburger icon)

Bij clicking the '+' button, you enter another view, without the ECSlidingView:

Second view

Now, I would like to return to the first view once a user clicks on the 'Voeg Toe' button in the second view. I have tried using:

FoodViewController *myController = [self.storyboard instantiateViewControllerWithIdentifier:@"Voedingsdagboek"];
    [self presentViewController:myController animated:YES completion:nil];

However, now the ECSlider does not work anymore. So I cannot navigate through the rest of the application. How can I solve this?

Was it helpful?

Solution 2

Eventually I fixed it by using:

self.slidingViewController.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Voedingsdagboek"];
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];

OTHER TIPS

To go back to previous view you can write popViewController in buttonTapped Method.

[self.navigationController popViewControllerAnimated:YES];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top