- Implemented clear for slide animation
- Fixed an issue with scale animation
This commit is contained in:
parent
a759310b3b
commit
93b7afcfd8
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [self initWithMinimumScale:.8])
|
||||
if (self = [self initWithMinimumScale:.9])
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
menuViewController.view.transform = CGAffineTransformScale([SlideNavigationController sharedInstance].view.transform, self.minimumScale, self.minimumScale);
|
||||
menuViewController.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, self.minimumScale, self.minimumScale);
|
||||
}
|
||||
|
||||
- (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress
|
||||
|
|
|
|||
|
|
@ -102,7 +102,32 @@
|
|||
|
||||
- (void)clear
|
||||
{
|
||||
// Nothing to do
|
||||
[self clearMenu:MenuLeft];
|
||||
[self clearMenu:MenuRight];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method -
|
||||
|
||||
- (void)clearMenu:(Menu)menu
|
||||
{
|
||||
UIViewController *menuViewController = (menu == MenuLeft)
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
|
||||
|
||||
CGRect rect = menuViewController.view.frame;
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = 0;
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ static SlideNavigationController *singletonInstance;
|
|||
if (([self isMenuOpen] && !forcePrepare) || menuViewController.view.superview)
|
||||
return;
|
||||
|
||||
menuViewController.view.frame = [self initialRectForMenu];
|
||||
//menuViewController.view.frame = [self initialRectForMenu];
|
||||
[self.menuRevealAnimator prepareMenuForAnimation:menu];
|
||||
|
||||
[removingMenuViewController.view removeFromSuperview];
|
||||
|
|
|
|||
Loading…
Reference in New Issue