John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 990 forks source link

Option to animate in the rear view controller? #59

Closed mluisbrown closed 10 years ago

mluisbrown commented 11 years ago

Hi, I was wondering if it would be possible to add an option in SWRevealViewContoller so that the rear (left side) view controller is animated in at the same time that the front view controller is animated to the side. The best example of an app that does this is Vesper. The rear view controller starts off slightly to the left of the screen and as the front view controller animates to the right, the rear view controller is simultaneously animated to the right (by a much lesser amount) so that when the animation finishes it's in the correct position.

Michael.

John-Lluch commented 11 years ago

Hi, Is this the same the Wunderlist app does?

Thanks

John-Lluch commented 11 years ago

Hi, I just updated the class with two new properties that allow you to specify the amount of displacement you want for the rear and right controllers

// Defines how much displacement is applied to the rear view when animating or dragging the front view, default is 40. @property (assign, nonatomic) CGFloat rearViewRevealDisplacement; @property (assign, nonatomic) CGFloat rightViewRevealDisplacement;

mluisbrown commented 11 years ago

Hi, Yes, it's exactly the same as what the Wunderlist app does (I just installed it to check) :-) Thanks.

John-Lluch commented 11 years ago

Pleas check now the SWRevealViewController. Thanks

mluisbrown commented 11 years ago

Wow, thanks! I'll check it out this evening.

mluisbrown commented 11 years ago

Awesome! Works brilliantly.