質問

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?

役に立ちましたか?

解決 2

Eventually I fixed it by using:

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

他のヒント

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

[self.navigationController popViewControllerAnimated:YES];
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top