ECSlidingViewController 2 not working XCode 7 iOS 9

781 views Asked by At

The unwind segue to the menu view is no longer working on XCode 7 with iOS 9.

The only way I got it to "work" is by changing the type of segue in the storyboard to an ECSlidingSegue from the default UIStoryboardSegue. the ability to change this in the storyboard for unwind segues seems to be new to XCode 7. When changed to the ECSlidingSegue it only shows the menu view itself and the view it was supposed to shift to the right (but still keep on the screen) disappears. All other segues seem to be working and I can confirm that all was working correctly in iOS 8 and XCode 6.

Any ideas why this would not be working?

3

There are 3 answers

1
Andriy Gordiychuk On

It looks like ECSlidingViewController hasn't been updated for a year now.

In some of my apps I am using MMDrawerController which seems to do exactly the same and I can confirm that it works with iOS 9. And it is updated on a more regular basis. If you are interested in trying it you can check it here

3
Tomas Stanik On

No, but until it's fixed, you can show the menu from code:

- (IBAction)menuButtonTap
{
    ECSlidingViewController *slidingViewController = (ECSlidingViewController *)self.view.window.rootViewController;
    [slidingViewController anchorTopViewToRightAnimated:YES];
}
0
Chris Stuart On
@IBAction func menuButtonTapped(sender: AnyObject) {
    let slidingViewController = self.view.window!.rootViewController as? ECSlidingViewController
    slidingViewController?.anchorTopViewToRightAnimated(true)
}

I managed to get it working correctly using swift by attaching each of the menu buttons in each of the view controllers to an IBAction function. I then put the code as it is above into each of these IBAction functions. The code uses the current instance of ECSlidingViewController (the current view) and then calls anchorTopViewToRightAnimated in order to correctly assign the current view that is being pulled to the right.