Search code examples
iosanimationsidebarpushviewcontrollerswrevealviewcontroller

ios SWRevealViewController reveal push segue animation


I'm using SWRevealViewController(the updated version) to make a slide-out sidebar menu app,

connecting different rear view controllers (based on different sidebar cell tapped) by

SWRevealViewControllerSeguePushController class segue.

every time I tap a cell which is different from the current one

the sidebar becomes fully reveal then the new rear view controller gets pushed-in from

the right side.

It looks like the old rear vc first moves to the right (totally invisible) and then the new one moves

to the left to show full screen.

That does not look smooth, I want it looks like I'm always using the same view controller when

different cell tapped and the rear vc would always be visible at least a part of it.

any way to modify the original animation setting?

thanks in advance!


Solution

  • finally found the setting method in

    - (void)_dispatchPushFrontViewController:(UIViewController *)newFrontViewController animated:(BOOL)animated
    {
    FrontViewPosition preReplacementPosition = FrontViewPositionLeft;
    if ( _frontViewPosition > FrontViewPositionLeft ) preReplacementPosition = FrontViewPositionRightMost; 
    

    //change FrontViewPositionRightMost to FrontViewPositionRight