Compare commits
43 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
d48909d9c4 | |
|
|
71eb343abe | |
|
|
95f692c225 | |
|
|
42e62a4dbd | |
|
|
2ed9400c82 | |
|
|
06deaf308c | |
|
|
f3b60362da | |
|
|
9550d4719b | |
|
|
d088879c28 | |
|
|
5ef5a8d832 | |
|
|
0da57dfd53 | |
|
|
240684c788 | |
|
|
c6c729bb52 | |
|
|
7fb3ec03e9 | |
|
|
a9ca4b49b0 | |
|
|
363306a5c7 | |
|
|
4ce138d4e9 | |
|
|
43cb763d79 | |
|
|
8681050dd0 | |
|
|
98591515e6 | |
|
|
1a1b8523ec | |
|
|
3c1b09fe74 | |
|
|
6a9333e81b | |
|
|
07e14208be | |
|
|
22c03d987e | |
|
|
0e1ac70eeb | |
|
|
2cf2b31c62 | |
|
|
f9909b669f | |
|
|
792fb82d6b | |
|
|
eb2de83daf | |
|
|
2786733c82 | |
|
|
9d38ca4c76 | |
|
|
c2638e8935 | |
|
|
907eee38e8 | |
|
|
4c66f6c25c | |
|
|
810457bb73 | |
|
|
43f62e7321 | |
|
|
7dba83b832 | |
|
|
352a127909 | |
|
|
f2d50da1f6 | |
|
|
cf05a15b2f | |
|
|
5aa1fbcd94 | |
|
|
ffa26fba5b |
|
|
@ -33,9 +33,9 @@ Setup
|
|||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init];
|
||||
RightMenuViewController *righMenu = [[RightMenuViewController alloc] init];
|
||||
RightMenuViewController *rightMenu = [[RightMenuViewController alloc] init];
|
||||
|
||||
[SlideNavigationController sharedInstance].righMenu = rightMenu;
|
||||
[SlideNavigationController sharedInstance].rightMenu = rightMenu;
|
||||
[SlideNavigationController sharedInstance].leftMenu = leftMenu;
|
||||
|
||||
// Override point for customization after application launch.
|
||||
|
|
@ -96,6 +96,10 @@ Behaves exactly the same as leftbarButtonItem, but it's used as the right button
|
|||
Default value of portraitSlideOffset is 60. This means when the menu is open, the width of the visible portion of the navigation controller is 60 pixels in portrait mode
|
||||
###### landscapeSlideOffset
|
||||
Default value of portraitSlideOffset is 60. This means when the menu is open, the width of the visible portion of the navigation controller is 60 pixels in landscape mode
|
||||
###### menuRevealAnimationDuration
|
||||
Default value of animation duration is .3, this property allows configuring animation duration
|
||||
###### menuRevealAnimationOption
|
||||
Defaults to UIViewAnimationOptionCurveEaseOut, you can change this property to configure animation options
|
||||
###### menuRevealAnimator
|
||||
menuRevealAnimator is used to animate the left/right menu during reveal. The default value is nil, that means no animations occure when opening/closing the menu.
|
||||
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@
|
|||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
|
||||
INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
|
|
@ -536,6 +537,7 @@
|
|||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
|
||||
INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
[SlideNavigationController sharedInstance].rightMenu = rightMenu;
|
||||
[SlideNavigationController sharedInstance].leftMenu = leftMenu;
|
||||
[SlideNavigationController sharedInstance].menuRevealAnimationDuration = .18;
|
||||
|
||||
// Creating a custom bar button for right menu
|
||||
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
|
||||
|
|
@ -41,6 +42,11 @@
|
|||
NSLog(@"Opened %@", menu);
|
||||
}];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerWillOpen object:nil queue:nil usingBlock:^(NSNotification *note) {
|
||||
NSString *menu = note.userInfo[@"menu"];
|
||||
NSLog(@"Opening %@", menu);
|
||||
}];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidReveal object:nil queue:nil usingBlock:^(NSNotification *note) {
|
||||
NSString *menu = note.userInfo[@"menu"];
|
||||
NSLog(@"Revealed %@", menu);
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)slideNavigationControllerShouldDisplayRightMenu
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 20;
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
|
||||
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"leftMenu.jpg"]];
|
||||
self.tableView.backgroundView = imageView;
|
||||
|
||||
self.view.layer.borderWidth = .6;
|
||||
self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
|
||||
}
|
||||
|
||||
#pragma mark - UITableView Delegate & Datasrouce -
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@
|
|||
|
||||
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"rightMenu.jpg"]];
|
||||
self.tableView.backgroundView = imageView;
|
||||
|
||||
self.view.layer.borderWidth = .6;
|
||||
self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
|
||||
}
|
||||
|
||||
#pragma mark - UITableView Delegate & Datasrouce -
|
||||
|
|
@ -83,31 +80,38 @@
|
|||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
id <SlideNavigationContorllerAnimator> revealAnimator;
|
||||
CGFloat animationDuration = 0;
|
||||
|
||||
switch (indexPath.row)
|
||||
{
|
||||
case 0:
|
||||
revealAnimator = nil;
|
||||
animationDuration = .19;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
revealAnimator = [[SlideNavigationContorllerAnimatorSlide alloc] init];
|
||||
animationDuration = .19;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
revealAnimator = [[SlideNavigationContorllerAnimatorFade alloc] init];
|
||||
animationDuration = .18;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
revealAnimator = [[SlideNavigationContorllerAnimatorSlideAndFade alloc] initWithMaximumFadeAlpha:.8 fadeColor:[UIColor blackColor] andSlideMovement:100];
|
||||
animationDuration = .19;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
revealAnimator = [[SlideNavigationContorllerAnimatorScale alloc] init];
|
||||
animationDuration = .22;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
revealAnimator = [[SlideNavigationContorllerAnimatorScaleAndFade alloc] initWithMaximumFadeAlpha:.6 fadeColor:[UIColor blackColor] andMinimumScale:.8];
|
||||
animationDuration = .22;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -115,6 +119,7 @@
|
|||
}
|
||||
|
||||
[[SlideNavigationController sharedInstance] closeMenuWithCompletion:^{
|
||||
[SlideNavigationController sharedInstance].menuRevealAnimationDuration = animationDuration;
|
||||
[SlideNavigationController sharedInstance].menuRevealAnimator = revealAnimator;
|
||||
}];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.aryaxt.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@
|
|||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [self initWithSlideMovement:100])
|
||||
{
|
||||
}
|
||||
|
||||
return self;
|
||||
if (self = [self initWithSlideMovement:100])
|
||||
{
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithSlideMovement:(CGFloat)slideMovement
|
||||
|
|
@ -55,98 +55,119 @@
|
|||
- (void)prepareMenuForAnimation:(Menu)menu
|
||||
{
|
||||
UIViewController *menuViewController = (menu == MenuLeft)
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
|
||||
CGRect rect = menuViewController.view.frame;
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
if (orientation == UIInterfaceOrientationLandscapeRight)
|
||||
{
|
||||
rect.origin.y = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.y = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (orientation == UIInterfaceOrientationPortrait)
|
||||
{
|
||||
rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
if (orientation == UIInterfaceOrientationLandscapeRight)
|
||||
{
|
||||
rect.origin.y = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.y = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (orientation == UIInterfaceOrientationPortrait)
|
||||
{
|
||||
rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
}
|
||||
|
||||
- (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress
|
||||
{
|
||||
UIViewController *menuViewController = (menu == MenuLeft)
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
|
||||
|
||||
NSInteger location = (menu == MenuLeft)
|
||||
? (self.slideMovement * -1) + (self.slideMovement * progress)
|
||||
: (self.slideMovement * (1-progress));
|
||||
|
||||
if (menu == MenuLeft)
|
||||
location = (location > 0) ? 0 : location;
|
||||
|
||||
if (menu == MenuRight)
|
||||
location = (location < 0) ? 0 : location;
|
||||
|
||||
CGRect rect = menuViewController.view.frame;
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1;
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
UIViewController *menuViewController = (menu == MenuLeft)
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
UIInterfaceOrientation orientation = [SlideNavigationController sharedInstance].interfaceOrientation;
|
||||
|
||||
NSInteger location = (menu == MenuLeft)
|
||||
? (self.slideMovement * -1) + (self.slideMovement * progress)
|
||||
: (self.slideMovement * (1-progress));
|
||||
|
||||
if (menu == MenuLeft)
|
||||
location = (location > 0) ? 0 : location;
|
||||
|
||||
if (menu == MenuRight)
|
||||
location = (location < 0) ? 0 : location;
|
||||
|
||||
CGRect rect = menuViewController.view.frame;
|
||||
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
rect.origin.x = location;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1;
|
||||
}
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
}
|
||||
|
||||
- (void)clear
|
||||
{
|
||||
[self clearMenu:MenuLeft];
|
||||
[self clearMenu:MenuRight];
|
||||
[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;
|
||||
UIViewController *menuViewController = (menu == MenuLeft)
|
||||
? [SlideNavigationController sharedInstance].leftMenu
|
||||
: [SlideNavigationController sharedInstance].rightMenu;
|
||||
|
||||
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
|
||||
|
||||
CGRect rect = menuViewController.view.frame;
|
||||
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
rect.origin.x = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = 0;
|
||||
}
|
||||
}
|
||||
|
||||
menuViewController.view.frame = rect;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
|
||||
|
||||
@protocol SlideNavigationControllerDelegate <NSObject>
|
||||
@optional
|
||||
- (BOOL)slideNavigationControllerShouldDisplayRightMenu;
|
||||
|
|
@ -46,6 +48,8 @@ extern NSString * const SlideNavigationControllerDidOpen;
|
|||
extern NSString *const SlideNavigationControllerDidClose;
|
||||
extern NSString *const SlideNavigationControllerDidReveal;
|
||||
|
||||
extern NSString *const SlideMenuOpenAfterSwipeKey;
|
||||
|
||||
@property (nonatomic, assign) BOOL avoidSwitchingToSameClassViewController;
|
||||
@property (nonatomic, assign) BOOL enableSwipeGesture;
|
||||
@property (nonatomic, assign) BOOL enableShadow;
|
||||
|
|
@ -56,6 +60,9 @@ extern NSString *const SlideNavigationControllerDidReveal;
|
|||
@property (nonatomic, assign) CGFloat portraitSlideOffset;
|
||||
@property (nonatomic, assign) CGFloat landscapeSlideOffset;
|
||||
@property (nonatomic, assign) CGFloat panGestureSideOffset;
|
||||
@property (nonatomic, assign) CGFloat menuOpenAnimationDuration;
|
||||
@property (nonatomic, assign) CGFloat menuCloseAnimationDuration;
|
||||
@property (nonatomic, assign) UIViewAnimationOptions menuRevealAnimationOption;
|
||||
@property (nonatomic, strong) id <SlideNavigationContorllerAnimator> menuRevealAnimator;
|
||||
|
||||
+ (SlideNavigationController *)sharedInstance;
|
||||
|
|
@ -71,4 +78,6 @@ extern NSString *const SlideNavigationControllerDidReveal;
|
|||
- (void)toggleRightMenu;
|
||||
- (BOOL)isMenuOpen;
|
||||
|
||||
- (void)prepareMenuForReveal:(Menu)menu;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ typedef enum {
|
|||
@property (nonatomic, strong) UIPanGestureRecognizer *panRecognizer;
|
||||
@property (nonatomic, assign) CGPoint draggingPoint;
|
||||
@property (nonatomic, assign) Menu lastRevealedMenu;
|
||||
@property (nonatomic, assign) BOOL menuNeedsLayout;
|
||||
@end
|
||||
|
||||
@implementation SlideNavigationController
|
||||
|
|
@ -46,8 +47,12 @@ NSString * const SlideNavigationControllerDidOpen = @"SlideNavigationControllerD
|
|||
NSString * const SlideNavigationControllerDidClose = @"SlideNavigationControllerDidClose";
|
||||
NSString *const SlideNavigationControllerDidReveal = @"SlideNavigationControllerDidReveal";
|
||||
|
||||
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
|
||||
NSString *const SlideMenuOpenAfterSwipeKey = @"SlideMenuOpenAfterSwipeKey";
|
||||
|
||||
#define MENU_SLIDE_ANIMATION_DURATION .3
|
||||
#define MENU_SLIDE_OPEN_ANIMATION_DURATION .4
|
||||
#define MENU_SLIDE_CLOSE_ANIMATION_DURATION .2
|
||||
#define MENU_SLIDE_ANIMATION_OPTION UIViewAnimationOptionCurveLinear
|
||||
#define MENU_QUICK_SLIDE_ANIMATION_DURATION .18
|
||||
#define MENU_IMAGE @"menu-button"
|
||||
#define MENU_SHADOW_RADIUS 10
|
||||
|
|
@ -101,6 +106,16 @@ static SlideNavigationController *singletonInstance;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithNavigationBarClass:(Class)navigationBarClass toolbarClass:(Class)toolbarClass
|
||||
{
|
||||
if (self = [super initWithNavigationBarClass:navigationBarClass toolbarClass:toolbarClass])
|
||||
{
|
||||
[self setup];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setup
|
||||
{
|
||||
if (singletonInstance)
|
||||
|
|
@ -108,6 +123,9 @@ static SlideNavigationController *singletonInstance;
|
|||
|
||||
singletonInstance = self;
|
||||
|
||||
self.menuOpenAnimationDuration = MENU_SLIDE_OPEN_ANIMATION_DURATION;
|
||||
self.menuCloseAnimationDuration = MENU_SLIDE_CLOSE_ANIMATION_DURATION;
|
||||
self.menuRevealAnimationOption = MENU_SLIDE_ANIMATION_OPTION;
|
||||
self.landscapeSlideOffset = MENU_DEFAULT_SLIDE_OFFSET;
|
||||
self.portraitSlideOffset = MENU_DEFAULT_SLIDE_OFFSET;
|
||||
self.panGestureSideOffset = 0;
|
||||
|
|
@ -124,31 +142,39 @@ static SlideNavigationController *singletonInstance;
|
|||
// Update shadow size of enabled
|
||||
if (self.enableShadow)
|
||||
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds].CGPath;
|
||||
|
||||
// When menu open we disable user interaction
|
||||
// When rotates we want to make sure that userInteraction is enabled again
|
||||
//[self enableTapGestureToCloseMenu:NO];
|
||||
|
||||
if (self.menuNeedsLayout)
|
||||
{
|
||||
[self updateMenuFrameAndTransformAccordingToOrientation];
|
||||
|
||||
// Handle different horizontal/vertical slideOffset during rotation
|
||||
// On iOS below 8 we just close the menu, iOS8 handles rotation better so we support keepiong the menu open
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0") && [self isMenuOpen])
|
||||
{
|
||||
Menu menu = (self.horizontalLocation > 0) ? MenuLeft : MenuRight;
|
||||
[self openMenu:menu withCompletion:nil];
|
||||
}
|
||||
|
||||
self.menuNeedsLayout = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
||||
{
|
||||
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
||||
|
||||
self.menuNeedsLayout = YES;
|
||||
}
|
||||
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
|
||||
{
|
||||
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
|
||||
// When menu open we disable user interaction
|
||||
// When rotates we want to make sure that userInteraction is enabled again
|
||||
[self enableTapGestureToCloseMenu:NO];
|
||||
|
||||
// Avoid an ugnly shadow in background while rotating
|
||||
self.view.layer.shadowOpacity = 0;
|
||||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
|
||||
{
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
// Update rotation animation
|
||||
[self updateMenuFrameAndTransformAccordingToOrientation];
|
||||
|
||||
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds].CGPath;
|
||||
|
||||
// we set shadowOpacity to 0 in willRotateToInterfaceOrientation, after the rotation we want to add the shadow back
|
||||
self.view.layer.shadowOpacity = MENU_SHADOW_OPACITY;
|
||||
self.menuNeedsLayout = YES;
|
||||
}
|
||||
|
||||
#pragma mark - Public Methods -
|
||||
|
|
@ -187,8 +213,7 @@ static SlideNavigationController *singletonInstance;
|
|||
}
|
||||
|
||||
- (void)switchToViewController:(UIViewController *)viewController
|
||||
withSlideOutAnimation:(BOOL)slideOutAnimation
|
||||
popType:(PopType)poptype
|
||||
popType:(PopType)poptype
|
||||
andCompletion:(void (^)())completion
|
||||
{
|
||||
if (self.avoidSwitchingToSameClassViewController && [self.topViewController isKindOfClass:viewController.class])
|
||||
|
|
@ -196,95 +221,87 @@ static SlideNavigationController *singletonInstance;
|
|||
[self closeMenuWithCompletion:completion];
|
||||
return;
|
||||
}
|
||||
|
||||
void (^switchAndCallCompletion)(BOOL) = ^(BOOL closeMenuBeforeCallingCompletion) {
|
||||
if (poptype == PopTypeAll) {
|
||||
[self setViewControllers:@[viewController]];
|
||||
}
|
||||
else {
|
||||
[super popToRootViewControllerAnimated:NO];
|
||||
[super pushViewController:viewController animated:NO];
|
||||
}
|
||||
|
||||
if (closeMenuBeforeCallingCompletion)
|
||||
{
|
||||
[self closeMenuWithCompletion:^{
|
||||
if (completion)
|
||||
completion();
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (completion)
|
||||
completion();
|
||||
}
|
||||
};
|
||||
|
||||
if ([self isMenuOpen])
|
||||
{
|
||||
if (slideOutAnimation)
|
||||
{
|
||||
[UIView animateWithDuration:(slideOutAnimation) ? MENU_SLIDE_ANIMATION_DURATION : 0
|
||||
delay:0
|
||||
options:UIViewAnimationOptionCurveEaseOut
|
||||
animations:^{
|
||||
CGFloat width = self.horizontalSize;
|
||||
CGFloat moveLocation = (self.horizontalLocation> 0) ? width : -1*width;
|
||||
[self moveHorizontallyToLocation:moveLocation];
|
||||
} completion:^(BOOL finished) {
|
||||
switchAndCallCompletion(YES);
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
switchAndCallCompletion(YES);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switchAndCallCompletion(NO);
|
||||
}
|
||||
|
||||
void (^switchAndCallCompletion)(BOOL) = ^(BOOL closeMenuBeforeCallingCompletion) {
|
||||
if (poptype == PopTypeAll) {
|
||||
[self setViewControllers:@[viewController]];
|
||||
}
|
||||
else {
|
||||
[super popToRootViewControllerAnimated:NO];
|
||||
[super pushViewController:viewController animated:NO];
|
||||
}
|
||||
|
||||
if (closeMenuBeforeCallingCompletion)
|
||||
{
|
||||
[self closeMenuWithCompletion:^{
|
||||
if (completion)
|
||||
completion();
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (completion)
|
||||
completion();
|
||||
}
|
||||
};
|
||||
|
||||
// if ([self isMenuOpen])
|
||||
// {
|
||||
// if (slideOutAnimation)
|
||||
// {
|
||||
// [UIView animateWithDuration:(slideOutAnimation) ? self.menuRevealAnimationDuration : 0
|
||||
// delay:0
|
||||
// options:self.menuRevealAnimationOption
|
||||
// animations:^{
|
||||
// CGFloat width = self.horizontalSize;
|
||||
// CGFloat moveLocation = (self.horizontalLocation> 0) ? width : -1*width;
|
||||
// [self moveHorizontallyToLocation:moveLocation];
|
||||
// } completion:^(BOOL finished) {
|
||||
// switchAndCallCompletion(YES);
|
||||
// }];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// switchAndCallCompletion(YES);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// switchAndCallCompletion(NO);
|
||||
// }
|
||||
|
||||
switchAndCallCompletion([self isMenuOpen]);
|
||||
}
|
||||
|
||||
- (void)switchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion
|
||||
{
|
||||
[self switchToViewController:viewController withSlideOutAnimation:YES popType:PopTypeRoot andCompletion:completion];
|
||||
[self switchToViewController:viewController popType:PopTypeRoot andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)popToRootAndSwitchToViewController:(UIViewController *)viewController
|
||||
withSlideOutAnimation:(BOOL)slideOutAnimation
|
||||
andCompletion:(void (^)())completion
|
||||
{
|
||||
[self switchToViewController:viewController withSlideOutAnimation:slideOutAnimation popType:PopTypeRoot andCompletion:completion];
|
||||
[self switchToViewController:viewController popType:PopTypeRoot andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)popToRootAndSwitchToViewController:(UIViewController *)viewController
|
||||
withCompletion:(void (^)())completion
|
||||
{
|
||||
[self switchToViewController:viewController withSlideOutAnimation:YES popType:PopTypeRoot andCompletion:completion];
|
||||
[self switchToViewController:viewController popType:PopTypeRoot andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)popAllAndSwitchToViewController:(UIViewController *)viewController
|
||||
withSlideOutAnimation:(BOOL)slideOutAnimation
|
||||
andCompletion:(void (^)())completion
|
||||
{
|
||||
[self switchToViewController:viewController withSlideOutAnimation:slideOutAnimation popType:PopTypeAll andCompletion:completion];
|
||||
[self switchToViewController:viewController popType:PopTypeAll andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)popAllAndSwitchToViewController:(UIViewController *)viewController
|
||||
withCompletion:(void (^)())completion
|
||||
{
|
||||
[self switchToViewController:viewController withSlideOutAnimation:YES popType:PopTypeAll andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)closeMenuWithCompletion:(void (^)())completion
|
||||
{
|
||||
[self closeMenuWithDuration:MENU_SLIDE_ANIMATION_DURATION andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)openMenu:(Menu)menu withCompletion:(void (^)())completion
|
||||
{
|
||||
[self openMenu:menu withDuration:MENU_SLIDE_ANIMATION_DURATION andCompletion:completion];
|
||||
[self switchToViewController:viewController popType:PopTypeAll andCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)toggleLeftMenu
|
||||
|
|
@ -451,15 +468,30 @@ static SlideNavigationController *singletonInstance;
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (void)openMenu:(Menu)menu withDuration:(float)duration andCompletion:(void (^)())completion
|
||||
- (CGFloat)openingPart
|
||||
{
|
||||
CGFloat slideOffset = self.slideOffset;
|
||||
CGFloat absHorizontalLocation = (CGFloat)fabs(self.horizontalLocation);
|
||||
|
||||
return MIN(1.f, absHorizontalLocation/slideOffset);
|
||||
}
|
||||
|
||||
- (void)openMenu:(Menu)menu withCompletion:(void (^)())completion
|
||||
{
|
||||
[self openMenu:menu afterSwipe:NO withCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)openMenu:(Menu)menu afterSwipe:(BOOL)afterSwipe withCompletion:(void (^)())completion
|
||||
{
|
||||
NSTimeInterval duration = self.menuOpenAnimationDuration * (1.f - [self openingPart]);
|
||||
|
||||
[self enableTapGestureToCloseMenu:YES];
|
||||
|
||||
[self prepareMenuForReveal:menu];
|
||||
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionCurveEaseOut
|
||||
options:self.menuRevealAnimationOption
|
||||
animations:^{
|
||||
CGRect rect = self.view.frame;
|
||||
CGFloat width = self.horizontalSize;
|
||||
|
|
@ -470,19 +502,23 @@ static SlideNavigationController *singletonInstance;
|
|||
if (completion)
|
||||
completion();
|
||||
|
||||
[self postNotificationWithName:SlideNavigationControllerDidOpen forMenu:menu];
|
||||
[self postNotificationWithName:SlideNavigationControllerDidOpen forMenu:menu withExtParams:@{
|
||||
SlideMenuOpenAfterSwipeKey : @(afterSwipe)
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)closeMenuWithDuration:(float)duration andCompletion:(void (^)())completion
|
||||
- (void)closeMenuWithCompletion:(void (^)())completion
|
||||
{
|
||||
NSTimeInterval duration = self.menuCloseAnimationDuration * [self openingPart];
|
||||
|
||||
[self enableTapGestureToCloseMenu:NO];
|
||||
|
||||
Menu menu = (self.horizontalLocation > 0) ? MenuLeft : MenuRight;
|
||||
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionCurveEaseOut
|
||||
options:self.menuRevealAnimationOption
|
||||
animations:^{
|
||||
CGRect rect = self.view.frame;
|
||||
rect.origin.x = 0;
|
||||
|
|
@ -506,16 +542,24 @@ static SlideNavigationController *singletonInstance;
|
|||
[self postNotificationWithName:SlideNavigationControllerDidReveal forMenu:(location > 0) ? MenuLeft : MenuRight];
|
||||
}
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.x = 0;
|
||||
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1;
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
rect.origin.x = location;
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
rect.origin.x = 0;
|
||||
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1;
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
self.view.frame = rect;
|
||||
[self updateMenuAnimation:menu];
|
||||
|
|
@ -536,25 +580,22 @@ static SlideNavigationController *singletonInstance;
|
|||
rect.origin.x = 0;
|
||||
rect.origin.y = 0;
|
||||
|
||||
BOOL isIos7 = SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0");
|
||||
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
|
||||
{
|
||||
return rect;
|
||||
}
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation))
|
||||
{
|
||||
if (!isIos7)
|
||||
{
|
||||
// For some reasons in landscape belos the status bar is considered y=0, but in portrait it's considered y=20
|
||||
rect.origin.x = (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) ? 0 : STATUS_BAR_HEIGHT;
|
||||
rect.size.width = self.view.frame.size.width-STATUS_BAR_HEIGHT;
|
||||
}
|
||||
// For some reasons in landscape below the status bar is considered y=0, but in portrait it's considered y=20
|
||||
rect.origin.x = (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) ? 0 : STATUS_BAR_HEIGHT;
|
||||
rect.size.width = self.view.frame.size.width-STATUS_BAR_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isIos7)
|
||||
{
|
||||
// For some reasons in landscape belos the status bar is considered y=0, but in portrait it's considered y=20
|
||||
rect.origin.y = (self.interfaceOrientation == UIInterfaceOrientationPortrait) ? STATUS_BAR_HEIGHT : 0;
|
||||
rect.size.height = self.view.frame.size.height-STATUS_BAR_HEIGHT;
|
||||
}
|
||||
// For some reasons in landscape below the status bar is considered y=0, but in portrait it's considered y=20
|
||||
rect.origin.y = (self.interfaceOrientation == UIInterfaceOrientationPortrait) ? STATUS_BAR_HEIGHT : 0;
|
||||
rect.size.height = self.view.frame.size.height-STATUS_BAR_HEIGHT;
|
||||
}
|
||||
|
||||
return rect;
|
||||
|
|
@ -584,18 +625,25 @@ static SlideNavigationController *singletonInstance;
|
|||
CGRect rect = self.view.frame;
|
||||
UIInterfaceOrientation orientation = self.interfaceOrientation;
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
return (orientation == UIInterfaceOrientationLandscapeRight)
|
||||
? rect.origin.y
|
||||
: rect.origin.y*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (orientation == UIInterfaceOrientationPortrait)
|
||||
? rect.origin.x
|
||||
: rect.origin.x*-1;
|
||||
}
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
return rect.origin.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
return (orientation == UIInterfaceOrientationLandscapeRight)
|
||||
? rect.origin.y
|
||||
: rect.origin.y*-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (orientation == UIInterfaceOrientationPortrait)
|
||||
? rect.origin.x
|
||||
: rect.origin.x*-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)horizontalSize
|
||||
|
|
@ -603,34 +651,36 @@ static SlideNavigationController *singletonInstance;
|
|||
CGRect rect = self.view.frame;
|
||||
UIInterfaceOrientation orientation = self.interfaceOrientation;
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
return rect.size.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return rect.size.width;
|
||||
}
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
|
||||
{
|
||||
return rect.size.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIInterfaceOrientationIsLandscape(orientation))
|
||||
{
|
||||
return rect.size.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return rect.size.width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)postNotificationWithName:(NSString *)name forMenu:(Menu)menu
|
||||
{
|
||||
NSString *menuString = (menu == MenuLeft) ? NOTIFICATION_USER_INFO_MENU_LEFT : NOTIFICATION_USER_INFO_MENU_RIGHT;
|
||||
NSDictionary *userInfo = @{ NOTIFICATION_USER_INFO_MENU : menuString };
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:name object:nil userInfo:userInfo];
|
||||
[self postNotificationWithName:name forMenu:menu withExtParams:nil];
|
||||
}
|
||||
|
||||
#pragma mark - UINavigationControllerDelegate Methods -
|
||||
|
||||
- (void)navigationController:(UINavigationController *)navigationController
|
||||
willShowViewController:(UIViewController *)viewController
|
||||
animated:(BOOL)animated
|
||||
- (void)postNotificationWithName:(NSString *)name forMenu:(Menu)menu withExtParams:(NSDictionary *)extParams
|
||||
{
|
||||
if ([self shouldDisplayMenu:MenuLeft forViewController:viewController])
|
||||
viewController.navigationItem.leftBarButtonItem = [self barButtonItemForMenu:MenuLeft];
|
||||
|
||||
if ([self shouldDisplayMenu:MenuRight forViewController:viewController])
|
||||
viewController.navigationItem.rightBarButtonItem = [self barButtonItemForMenu:MenuRight];
|
||||
NSMutableDictionary *userInfo = extParams ? [extParams mutableCopy] : [NSMutableDictionary dictionary];
|
||||
|
||||
NSString *menuString = (menu == MenuLeft) ? NOTIFICATION_USER_INFO_MENU_LEFT : NOTIFICATION_USER_INFO_MENU_RIGHT;
|
||||
userInfo[NOTIFICATION_USER_INFO_MENU] = menuString;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:name object:nil userInfo:[userInfo copy]];
|
||||
}
|
||||
|
||||
- (CGFloat)slideOffset
|
||||
|
|
@ -693,8 +743,8 @@ static SlideNavigationController *singletonInstance;
|
|||
else
|
||||
currentMenu = (translation.x > 0) ? MenuLeft : MenuRight;
|
||||
|
||||
if (![self shouldDisplayMenu:currentMenu forViewController:self.topViewController])
|
||||
return;
|
||||
// if (![self shouldDisplayMenu:currentMenu forViewController:self.topViewController])
|
||||
// return;
|
||||
|
||||
[self prepareMenuForReveal:currentMenu];
|
||||
|
||||
|
|
@ -731,11 +781,11 @@ static SlideNavigationController *singletonInstance;
|
|||
if (currentX > 0)
|
||||
{
|
||||
if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController])
|
||||
[self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight withDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
|
||||
[self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight afterSwipe:YES withCompletion:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self closeMenuWithDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
|
||||
[self closeMenuWithCompletion:nil];
|
||||
}
|
||||
}
|
||||
// Moving Left
|
||||
|
|
@ -743,12 +793,12 @@ static SlideNavigationController *singletonInstance;
|
|||
{
|
||||
if (currentX > 0)
|
||||
{
|
||||
[self closeMenuWithDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
|
||||
[self closeMenuWithCompletion:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController])
|
||||
[self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight withDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil];
|
||||
[self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight afterSwipe:YES withCompletion:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -757,7 +807,7 @@ static SlideNavigationController *singletonInstance;
|
|||
if (currentXOffset < (self.horizontalSize - self.slideOffset)/2)
|
||||
[self closeMenuWithCompletion:nil];
|
||||
else
|
||||
[self openMenu:(currentX > 0) ? MenuLeft : MenuRight withCompletion:nil];
|
||||
[self openMenu:(currentX > 0) ? MenuLeft : MenuRight afterSwipe:YES withCompletion:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -826,4 +876,18 @@ static SlideNavigationController *singletonInstance;
|
|||
_menuRevealAnimator = menuRevealAnimator;
|
||||
}
|
||||
|
||||
- (void)setLeftMenu:(UIViewController *)leftMenu
|
||||
{
|
||||
[_leftMenu.view removeFromSuperview];
|
||||
|
||||
_leftMenu = leftMenu;
|
||||
}
|
||||
|
||||
- (void)setRightMenu:(UIViewController *)rightMenu
|
||||
{
|
||||
[_rightMenu.view removeFromSuperview];
|
||||
|
||||
_rightMenu = rightMenu;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="yzD-f0-X8n">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="yzD-f0-X8n">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1536" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Left Menu View Controller-->
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="11" y="49"/>
|
||||
</scene>
|
||||
<!--Home View Controller - Home-->
|
||||
<!--Home-->
|
||||
<scene sceneID="7Hl-22-JcN">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="HomeViewController" id="mAB-md-uek" customClass="HomeViewController" sceneMemberID="viewController">
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="1040" y="-222"/>
|
||||
</scene>
|
||||
<!--View Controller - No Menu-->
|
||||
<!--No Menu-->
|
||||
<scene sceneID="b5b-is-lY2">
|
||||
<objects>
|
||||
<viewController id="Tha-f2-JWx" sceneMemberID="viewController">
|
||||
|
|
@ -253,7 +253,7 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="1503" y="-222"/>
|
||||
</scene>
|
||||
<!--View Controller - Login-->
|
||||
<!--Login-->
|
||||
<scene sceneID="fe8-Xu-DEa">
|
||||
<objects>
|
||||
<viewController id="Rnc-YT-XEu" sceneMemberID="viewController">
|
||||
|
|
@ -289,13 +289,14 @@
|
|||
<navigationItem key="navigationItem" title="Login" id="huN-S6-yGa"/>
|
||||
<connections>
|
||||
<segue destination="nrg-5w-bbF" kind="push" identifier="FakeSegue" id="Rkp-YM-Gz0"/>
|
||||
<segue destination="qY1-Jo-UbZ" kind="push" identifier="FakeSegue33" id="37q-Mo-UFN"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="QC9-GK-F3v" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="499" y="49"/>
|
||||
</scene>
|
||||
<!--Profile View Controller - Profile-->
|
||||
<!--Profile-->
|
||||
<scene sceneID="xeE-nX-pb6">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ProfileViewController" id="nrg-5w-bbF" customClass="ProfileViewController" sceneMemberID="viewController">
|
||||
|
|
@ -334,7 +335,7 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="1044" y="437"/>
|
||||
</scene>
|
||||
<!--Friends View Controller - Friends-->
|
||||
<!--Friends-->
|
||||
<scene sceneID="Hbs-BS-FvF">
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="FriendsViewController" title="Friends" id="qY1-Jo-UbZ" customClass="FriendsViewController" sceneMemberID="viewController">
|
||||
|
|
@ -370,13 +371,16 @@
|
|||
<outlet property="delegate" destination="qY1-Jo-UbZ" id="FT7-ey-Dka"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="aah-ni-z8T">
|
||||
<barButtonItem key="rightBarButtonItem" title="Random Button" id="UsL-My-2Pu"/>
|
||||
</navigationItem>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="TeQ-ZL-OLP" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1042" y="1101"/>
|
||||
</scene>
|
||||
<!--View Controller - Friends-->
|
||||
<!--Friends-->
|
||||
<scene sceneID="yJW-sY-3g9">
|
||||
<objects>
|
||||
<viewController title="Friends" id="yDw-XY-MRH" sceneMemberID="viewController">
|
||||
|
|
@ -401,7 +405,7 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="1503" y="1100"/>
|
||||
</scene>
|
||||
<!--Profile Detail View Controller - Right Menu Only-->
|
||||
<!--Right Menu Only-->
|
||||
<scene sceneID="w1a-xD-Zgv">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ProfileDetailViewController" id="BLR-mt-TZ9" customClass="ProfileDetailViewController" sceneMemberID="viewController">
|
||||
|
|
@ -473,4 +477,4 @@
|
|||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'iOS-Slide-Menu'
|
||||
s.version = '1.4.2'
|
||||
s.version = '1.4.6'
|
||||
s.summary = 'A Slide Menu for iOS'
|
||||
s.homepage = 'https://github.com/aryaxt/iOS-Slide-Menu'
|
||||
s.license = {
|
||||
:type => 'MIT',
|
||||
:file => 'License.txt'
|
||||
}
|
||||
s.author = {'Aryan Gh' => 'https://github.com/aryaxt/iOS-Slide-Menu'}
|
||||
s.source = {:git => 'https://github.com/aryaxt/iOS-Slide-Menu.git', :tag => '1.4.2'}
|
||||
s.author = {'Aryan Ghassemi' => 'https://github.com/aryaxt/iOS-Slide-Menu'}
|
||||
s.source = {:git => 'https://github.com/aryaxt/iOS-Slide-Menu.git', :tag => '1.4.6'}
|
||||
s.platform = :ios, '6.0'
|
||||
s.source_files = 'SlideMenu/Source/*.{h,m}', 'SlideMenu/Source/Animations/*.{h,m}', 'SlideMenu/Source/Assets/*.{png}'
|
||||
s.source_files = 'SlideMenu/Source/*.{h,m}', 'SlideMenu/Source/Animations/*.{h,m}'
|
||||
s.resources = ['SlideMenu/Source/Assets/**/*']
|
||||
s.framework = 'Foundation', 'UIKit'
|
||||
s.requires_arc = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue