문제

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