Compare commits

..

49 Commits

Author SHA1 Message Date
Anton d48909d9c4 Remove excess method 2015-10-30 03:45:46 +03:00
Anton 71eb343abe Slide menu open/close animation depends on currently opening part 2015-10-29 23:55:01 +03:00
Anton 95f692c225 Slide menu notifications extends params added 2015-10-23 17:19:45 +03:00
Nikolai Ashanin 42e62a4dbd Update SlideNavigationController.m
remove reverse when menu did end close
2015-10-07 18:30:01 +03:00
Nikolai Ashanin 2ed9400c82 Update SlideNavigationController.m
slide menu open/close different durations
2015-10-07 18:08:40 +03:00
Anton 06deaf308c View controller is opening when menu is starting to close 2015-10-06 14:21:09 +03:00
Anton f3b60362da Add duration on opening and closing animations
Some refactoring
2015-08-28 17:38:25 +03:00
Anton 9550d4719b Slide menu show new controller after menu closing 2015-08-27 17:11:42 +03:00
Anton d088879c28 Remove tap gesture recognizer disabling on viewWllLayoutSubview event 2015-07-30 19:26:21 +03:00
iON1k 5ef5a8d832 Merge pull request #1 from TouchInstinct/feature/swipeMenuBeginEvent
Feature/swipe menu begin event
2015-07-01 16:18:29 +03:00
Павел Круглов 0da57dfd53 Fixed orientation issues. 2015-07-01 15:58:20 +03:00
Павел Круглов 240684c788 Hook point for swipe menu begin. 2015-06-30 18:18:37 +03:00
Павел Круглов c6c729bb52 Merge commit '7fb3ec03e919a6d4a5c622f224c2277ace85c61f' into feature/swipeMenuBeginEvent 2015-06-30 18:10:29 +03:00
Aryan Ghassemi 7fb3ec03e9 Fixed is landscape issues #138 2015-04-22 20:25:52 -07:00
Aryan Ghassemi a9ca4b49b0 Update README.md 2015-04-20 14:48:26 -07:00
Aryan Ghassemi 363306a5c7 Merge pull request #127 from aryaxt/FixInterfaceOrientationWarning
Fixed interfaceOrientation deprecated warning
2015-04-11 10:51:47 -07:00
Aryan Ghassemi 4ce138d4e9 Update pod spec for version 1.4.6 2015-04-11 10:49:22 -07:00
Aryan Ghassemi 43cb763d79 Fixed interfaceOrientation deprecated warning 2015-04-11 10:43:38 -07:00
Aryan Ghassemi 8681050dd0 Update README.md 2015-03-11 21:48:41 -07:00
Aryan Ghassemi 98591515e6 Merge pull request #128 from aryaxt/Develop
Turning shouldRecognizeSimultaneouslyWithGestureRecognizer off
2015-03-11 21:34:46 -07:00
Aryan Ghassemi 1a1b8523ec Turning shouldRecognizeSimultaneouslyWithGestureRecognizer off it's causing many issues 2015-03-11 21:32:56 -07:00
Aryan Ghassemi 3c1b09fe74 Updated pod spec for version 1.4.5 2015-03-01 19:18:26 -08:00
Aryan Ghassemi 6a9333e81b Merge pull request #113 from aryaxt/Develop
Version 1.4.5
2015-03-01 19:15:53 -08:00
Aryan Ghassemi 07e14208be Merge pull request #120 from loevborg/master
Small change to pod-spec
2015-03-01 19:14:48 -08:00
loevborg 22c03d987e Removed local representation of pod spec 2015-02-17 14:24:45 +01:00
loevborg 0e1ac70eeb Changes to pod spec
Removed the source/assets-png’s from s.source_files, since this causes
warnings when compiling the pod in project.
The source/assets is correctly part of the pod spec: s.resources, and
this is the only place it should appear
2015-02-17 14:22:39 +01:00
Aryan Ghassemi 2cf2b31c62 Merge pull request #114 from pnicholls/master
Added call to super in SlideNavigationController's viewWillTransitionToSize method
2015-02-16 10:28:38 -08:00
Peter Nicholls f9909b669f add a missing call to super in the SlideNavigationController viewWillTransitionToSize method 2015-01-31 15:58:06 +11:00
Aryan Ghassemi 792fb82d6b Update README.md 2015-01-25 08:58:18 -08:00
Aryan eb2de83daf #79 and #90 Allow simultaneous gestures to be detected by the menu 2015-01-25 08:50:52 -08:00
Aryan 2786733c82 Code formatting 2015-01-25 08:49:13 -08:00
Aryan 9d38ca4c76 Fixed #103 add initWithNavigationBarClass to slide menu 2015-01-25 08:48:54 -08:00
Aryan Ghassemi c2638e8935 Merge pull request #102 from masterrr/master
fix typo
2014-12-14 12:14:49 -08:00
masterrr 907eee38e8 fix typo 2014-12-11 21:06:20 +03:00
Aryan 4c66f6c25c Allow configuring animation duration/option 2014-11-28 16:19:34 -08:00
Aryan Ghassemi 810457bb73 Merge pull request #97 from aryaxt/Develop
Version 1.4.4
2014-11-28 14:18:00 -08:00
Aryan 43f62e7321 removed border from menus in the demo 2014-11-28 14:12:13 -08:00
Aryan 7dba83b832 Changed podspec version to 1.4.4 2014-11-28 14:03:58 -08:00
Aryan 352a127909 Fixed #89. Slide menu initially appears on the wrong side when using slide animation 2014-11-28 12:26:21 -08:00
Aryan f2d50da1f6 Fixed #93. Make sure that when the menu is changed the old view is removed 2014-11-28 12:24:45 -08:00
Aryan cf05a15b2f A right bar button that is added in storyboard, and has nothing todo with slide functionality 2014-11-28 12:23:23 -08:00
Aryan Ghassemi 5aa1fbcd94 Merge pull request #75 from aryaxt/iOS8-Compatability
iOS 8 fixes including bug #66
2014-10-01 09:11:50 -07:00
Aryan ffa26fba5b iOS 8 fixes including bug #66 2014-10-01 08:57:45 -07:00
Aryan Ghassemi 81378731d9 Merge pull request #73 from aryaxt/Develop
Posting Notifications for menu state open/close/reveal
2014-09-06 13:46:34 -07:00
Aryan eca136202c Added Notifications for closing/opening/revealing menu #32 2014-09-06 13:39:48 -07:00
Aryan 3513ce023a Updating project settings 2014-09-06 12:57:26 -07:00
Aryan Ghassemi da97baea8c Update README.md 2014-09-06 12:10:45 -07:00
Aryan Ghassemi 5cf9218a78 Update README.md 2014-08-01 09:57:54 -07:00
Aryan Ghassemi f36d092d32 Update README.md 2014-08-01 09:54:35 -07:00
14 changed files with 436 additions and 279 deletions

View File

@ -3,11 +3,11 @@ iOS-Slide-Menu
iOS Slide Menu built on top of UINavigationController, with configurable buttons, reveal animations, and tap/swiper gesture recognizers. iOS Slide Menu built on top of UINavigationController, with configurable buttons, reveal animations, and tap/swiper gesture recognizers.
- [Setup](https://github.com/aryaxt/iOS-Slide-Menu#setup) - [Setup](https://github.com/aryaxt/iOS-Slide-Menu#setup)
- [Switch ViewController](https://github.com/aryaxt/iOS-Slide-Menu#switch-between-viewcontrollers)
- [Enable/Disable Left/Right Menu](https://github.com/aryaxt/iOS-Slide-Menu#configuring-left-and-right-menu-for-different-viewcontrollers) - [Enable/Disable Left/Right Menu](https://github.com/aryaxt/iOS-Slide-Menu#configuring-left-and-right-menu-for-different-viewcontrollers)
- [Public Properties](https://github.com/aryaxt/iOS-Slide-Menu#public-properties) - [Public Properties](https://github.com/aryaxt/iOS-Slide-Menu#public-properties)
- [Public Methods](https://github.com/aryaxt/iOS-Slide-Menu#public-methods) - [Public Methods](https://github.com/aryaxt/iOS-Slide-Menu#public-methods)
- [Custom Animations](https://github.com/aryaxt/iOS-Slide-Menu#custom-animations) - [Custom Animations](https://github.com/aryaxt/iOS-Slide-Menu#custom-animations)
- [Notifications](https://github.com/aryaxt/iOS-Slide-Menu#notifications)
![alt tag](https://raw.github.com/aryaxt/iOS-Slide-Menu/master/slideMenuAnimation.gif) ![alt tag](https://raw.github.com/aryaxt/iOS-Slide-Menu/master/slideMenuAnimation.gif)
@ -33,25 +33,18 @@ Setup
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init]; 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; [SlideNavigationController sharedInstance].leftMenu = leftMenu;
// Override point for customization after application launch. // Override point for customization after application launch.
return YES; return YES;
} }
``` ```
Switch Between ViewControllers
----------
Let's say a menu item was selected
```
SomeViewController *vc = [[SomeViewController alloc] init];
[[SlideNavigationController sharedInstance] switchToViewController:vc withCompletion:nil];
```
Configuring Left and Right menu for different Viewcontrollers Configuring Left and Right menu for different Viewcontrollers
--------- ---------
You decide whether to enable or disable slide functionality on each viewController by implementing the following delegate methods of SlideNavigationControllerDelegate. These methods are optional, and if not implemented the menu functionality will be disabled for that particulat viewController. You decide whether to enable or disable slide functionality on **each viewController** by implementing the following delegate methods of SlideNavigationControllerDelegate. These methods are optional, and if not implemented the menu functionality will be disabled for that particulat viewController.
``` ```
@interface MyViewController : UIViewController <SlideNavigationControllerDelegate> @interface MyViewController : UIViewController <SlideNavigationControllerDelegate>
@end @end
@ -103,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 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 ###### 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 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
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. 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.
@ -175,3 +172,18 @@ This method gets called as the menu reveal occurs, and passes the progress to be
This method gets called if for any resons the instance of animator is being changed. For instance, the animator is changed from SlideNavigationContorllerAnimatorFade to SlideNavigationContorllerAnimatorSlide. In this method you should cleanup the state of the menu if neede. For instance if you added a view to the menu for reveal animation, you should remove it when clear gets called. This method gets called if for any resons the instance of animator is being changed. For instance, the animator is changed from SlideNavigationContorllerAnimatorFade to SlideNavigationContorllerAnimatorSlide. In this method you should cleanup the state of the menu if neede. For instance if you added a view to the menu for reveal animation, you should remove it when clear gets called.
Public Methods Public Methods
Notifications
---------
###### SlideNavigationControllerDidOpen
This notification is posted EVERY time the menu goes inot a complete open state
Userinfo contains a value with key "menu", which could have 2 values "left" and "right"
###### SlideNavigationControllerDidClose
This notification is posted EVERY time the menu goes inot a complete close state
Userinfo contains a value with key "menu", which could have 2 values "left" and "right"
###### SlideNavigationControllerDidReveal
This notification is posted once everytim a menu reveals
Userinfo contains a value with key "menu", which could have 2 values "left" and "right"

View File

@ -18,7 +18,6 @@
15371EF91728E3B400A508F4 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15371EF81728E3B400A508F4 /* Default-568h@2x.png */; }; 15371EF91728E3B400A508F4 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15371EF81728E3B400A508F4 /* Default-568h@2x.png */; };
15371EFC1728E3B400A508F4 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15371EFA1728E3B400A508F4 /* MainStoryboard_iPhone.storyboard */; }; 15371EFC1728E3B400A508F4 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15371EFA1728E3B400A508F4 /* MainStoryboard_iPhone.storyboard */; };
15371EFF1728E3B400A508F4 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15371EFD1728E3B400A508F4 /* MainStoryboard_iPad.storyboard */; }; 15371EFF1728E3B400A508F4 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15371EFD1728E3B400A508F4 /* MainStoryboard_iPad.storyboard */; };
15371F0A1728E3B400A508F4 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15371F091728E3B400A508F4 /* SenTestingKit.framework */; };
15371F0B1728E3B400A508F4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15371EE21728E3B400A508F4 /* UIKit.framework */; }; 15371F0B1728E3B400A508F4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15371EE21728E3B400A508F4 /* UIKit.framework */; };
15371F0C1728E3B400A508F4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15371EE41728E3B400A508F4 /* Foundation.framework */; }; 15371F0C1728E3B400A508F4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15371EE41728E3B400A508F4 /* Foundation.framework */; };
15371F141728E3B400A508F4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15371F121728E3B400A508F4 /* InfoPlist.strings */; }; 15371F141728E3B400A508F4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15371F121728E3B400A508F4 /* InfoPlist.strings */; };
@ -70,8 +69,7 @@
15371EF81728E3B400A508F4 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; }; 15371EF81728E3B400A508F4 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
15371EFB1728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; }; 15371EFB1728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
15371EFE1728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; }; 15371EFE1728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
15371F081728E3B400A508F4 /* SlideMenuTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlideMenuTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 15371F081728E3B400A508F4 /* SlideMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlideMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
15371F091728E3B400A508F4 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
15371F111728E3B400A508F4 /* SlideMenuTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SlideMenuTests-Info.plist"; sourceTree = "<group>"; }; 15371F111728E3B400A508F4 /* SlideMenuTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SlideMenuTests-Info.plist"; sourceTree = "<group>"; };
15371F131728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 15371F131728E3B400A508F4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
15371F151728E3B400A508F4 /* SlideMenuTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlideMenuTests.h; sourceTree = "<group>"; }; 15371F151728E3B400A508F4 /* SlideMenuTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlideMenuTests.h; sourceTree = "<group>"; };
@ -126,7 +124,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
15371F0A1728E3B400A508F4 /* SenTestingKit.framework in Frameworks */,
15371F0B1728E3B400A508F4 /* UIKit.framework in Frameworks */, 15371F0B1728E3B400A508F4 /* UIKit.framework in Frameworks */,
15371F0C1728E3B400A508F4 /* Foundation.framework in Frameworks */, 15371F0C1728E3B400A508F4 /* Foundation.framework in Frameworks */,
); );
@ -149,7 +146,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
15371EDE1728E3B400A508F4 /* SlideMenu.app */, 15371EDE1728E3B400A508F4 /* SlideMenu.app */,
15371F081728E3B400A508F4 /* SlideMenuTests.octest */, 15371F081728E3B400A508F4 /* SlideMenuTests.xctest */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@ -161,7 +158,6 @@
15371EE21728E3B400A508F4 /* UIKit.framework */, 15371EE21728E3B400A508F4 /* UIKit.framework */,
15371EE41728E3B400A508F4 /* Foundation.framework */, 15371EE41728E3B400A508F4 /* Foundation.framework */,
15371EE61728E3B400A508F4 /* CoreGraphics.framework */, 15371EE61728E3B400A508F4 /* CoreGraphics.framework */,
15371F091728E3B400A508F4 /* SenTestingKit.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -318,8 +314,8 @@
); );
name = SlideMenuTests; name = SlideMenuTests;
productName = SlideMenuTests; productName = SlideMenuTests;
productReference = 15371F081728E3B400A508F4 /* SlideMenuTests.octest */; productReference = 15371F081728E3B400A508F4 /* SlideMenuTests.xctest */;
productType = "com.apple.product-type.bundle"; productType = "com.apple.product-type.bundle.unit-test";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
@ -327,6 +323,7 @@
15371ED51728E3B400A508F4 /* Project object */ = { 15371ED51728E3B400A508F4 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastTestingUpgradeCheck = 0600;
LastUpgradeCheck = 0500; LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Aryan Ghassemi"; ORGANIZATIONNAME = "Aryan Ghassemi";
}; };
@ -528,6 +525,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist"; INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
@ -539,6 +537,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist"; INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
@ -551,13 +550,13 @@
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"", "\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
"$(inherited)",
); );
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
INFOPLIST_FILE = "SlideMenuTests/SlideMenuTests-Info.plist"; INFOPLIST_FILE = "SlideMenuTests/SlideMenuTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)"; TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = octest;
}; };
name = Debug; name = Debug;
}; };
@ -568,13 +567,13 @@
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"", "\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
"$(inherited)",
); );
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch";
INFOPLIST_FILE = "SlideMenuTests/SlideMenuTests-Info.plist"; INFOPLIST_FILE = "SlideMenuTests/SlideMenuTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)"; TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = octest;
}; };
name = Release; name = Release;
}; };

View File

@ -23,6 +23,7 @@
[SlideNavigationController sharedInstance].rightMenu = rightMenu; [SlideNavigationController sharedInstance].rightMenu = rightMenu;
[SlideNavigationController sharedInstance].leftMenu = leftMenu; [SlideNavigationController sharedInstance].leftMenu = leftMenu;
[SlideNavigationController sharedInstance].menuRevealAnimationDuration = .18;
// Creating a custom bar button for right menu // Creating a custom bar button for right menu
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)]; UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
@ -30,6 +31,26 @@
[button addTarget:[SlideNavigationController sharedInstance] action:@selector(toggleRightMenu) forControlEvents:UIControlEventTouchUpInside]; [button addTarget:[SlideNavigationController sharedInstance] action:@selector(toggleRightMenu) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button]; UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
[SlideNavigationController sharedInstance].rightBarButtonItem = rightBarButtonItem; [SlideNavigationController sharedInstance].rightBarButtonItem = rightBarButtonItem;
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidClose object:nil queue:nil usingBlock:^(NSNotification *note) {
NSString *menu = note.userInfo[@"menu"];
NSLog(@"Closed %@", menu);
}];
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidOpen object:nil queue:nil usingBlock:^(NSNotification *note) {
NSString *menu = note.userInfo[@"menu"];
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);
}];
// Override point for customization after application launch. // Override point for customization after application launch.

View File

@ -20,11 +20,6 @@
return YES; return YES;
} }
- (BOOL)slideNavigationControllerShouldDisplayRightMenu
{
return NO;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{ {
return 20; return 20;
@ -33,7 +28,7 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"friendCell"]; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"friendCell"];
cell.textLabel.text = [NSString stringWithFormat:@"Friend %d", indexPath.row]; cell.textLabel.text = [NSString stringWithFormat:@"Friend %ld", (long)indexPath.row];
return cell; return cell;
} }

View File

@ -32,9 +32,6 @@
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"leftMenu.jpg"]]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"leftMenu.jpg"]];
self.tableView.backgroundView = imageView; self.tableView.backgroundView = imageView;
self.view.layer.borderWidth = .6;
self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
} }
#pragma mark - UITableView Delegate & Datasrouce - #pragma mark - UITableView Delegate & Datasrouce -

View File

@ -20,9 +20,6 @@
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"rightMenu.jpg"]]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"rightMenu.jpg"]];
self.tableView.backgroundView = imageView; self.tableView.backgroundView = imageView;
self.view.layer.borderWidth = .6;
self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
} }
#pragma mark - UITableView Delegate & Datasrouce - #pragma mark - UITableView Delegate & Datasrouce -
@ -83,31 +80,38 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
id <SlideNavigationContorllerAnimator> revealAnimator; id <SlideNavigationContorllerAnimator> revealAnimator;
CGFloat animationDuration = 0;
switch (indexPath.row) switch (indexPath.row)
{ {
case 0: case 0:
revealAnimator = nil; revealAnimator = nil;
animationDuration = .19;
break; break;
case 1: case 1:
revealAnimator = [[SlideNavigationContorllerAnimatorSlide alloc] init]; revealAnimator = [[SlideNavigationContorllerAnimatorSlide alloc] init];
animationDuration = .19;
break; break;
case 2: case 2:
revealAnimator = [[SlideNavigationContorllerAnimatorFade alloc] init]; revealAnimator = [[SlideNavigationContorllerAnimatorFade alloc] init];
animationDuration = .18;
break; break;
case 3: case 3:
revealAnimator = [[SlideNavigationContorllerAnimatorSlideAndFade alloc] initWithMaximumFadeAlpha:.8 fadeColor:[UIColor blackColor] andSlideMovement:100]; revealAnimator = [[SlideNavigationContorllerAnimatorSlideAndFade alloc] initWithMaximumFadeAlpha:.8 fadeColor:[UIColor blackColor] andSlideMovement:100];
animationDuration = .19;
break; break;
case 4: case 4:
revealAnimator = [[SlideNavigationContorllerAnimatorScale alloc] init]; revealAnimator = [[SlideNavigationContorllerAnimatorScale alloc] init];
animationDuration = .22;
break; break;
case 5: case 5:
revealAnimator = [[SlideNavigationContorllerAnimatorScaleAndFade alloc] initWithMaximumFadeAlpha:.6 fadeColor:[UIColor blackColor] andMinimumScale:.8]; revealAnimator = [[SlideNavigationContorllerAnimatorScaleAndFade alloc] initWithMaximumFadeAlpha:.6 fadeColor:[UIColor blackColor] andMinimumScale:.8];
animationDuration = .22;
break; break;
default: default:
@ -115,6 +119,7 @@
} }
[[SlideNavigationController sharedInstance] closeMenuWithCompletion:^{ [[SlideNavigationController sharedInstance] closeMenuWithCompletion:^{
[SlideNavigationController sharedInstance].menuRevealAnimationDuration = animationDuration;
[SlideNavigationController sharedInstance].menuRevealAnimator = revealAnimator; [SlideNavigationController sharedInstance].menuRevealAnimator = revealAnimator;
}]; }];
} }

View File

@ -9,7 +9,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string> <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.aryaxt.${PRODUCT_NAME:rfc1034identifier}</string> <string>com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>

View File

@ -33,11 +33,11 @@
- (id)init - (id)init
{ {
if (self = [self initWithSlideMovement:100]) if (self = [self initWithSlideMovement:100])
{ {
} }
return self; return self;
} }
- (id)initWithSlideMovement:(CGFloat)slideMovement - (id)initWithSlideMovement:(CGFloat)slideMovement
@ -55,98 +55,119 @@
- (void)prepareMenuForAnimation:(Menu)menu - (void)prepareMenuForAnimation:(Menu)menu
{ {
UIViewController *menuViewController = (menu == MenuLeft) UIViewController *menuViewController = (menu == MenuLeft)
? [SlideNavigationController sharedInstance].leftMenu ? [SlideNavigationController sharedInstance].leftMenu
: [SlideNavigationController sharedInstance].rightMenu; : [SlideNavigationController sharedInstance].rightMenu;
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation; UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
CGRect rect = menuViewController.view.frame; CGRect rect = menuViewController.view.frame;
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
if (orientation == UIInterfaceOrientationLandscapeRight) rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
{ }
rect.origin.y = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement; else
} {
else if (UIInterfaceOrientationIsLandscape(orientation))
{ {
rect.origin.y = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement; if (orientation == UIInterfaceOrientationLandscapeRight)
} {
} rect.origin.y = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
else }
{ else
if (orientation == UIInterfaceOrientationPortrait) {
{ rect.origin.y = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement; }
} }
else else
{ {
rect.origin.x = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement; if (orientation == UIInterfaceOrientationPortrait)
} {
} rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement;
}
menuViewController.view.frame = rect; else
{
rect.origin.x = (menu == MenuRight) ? self.slideMovement*-1 : self.slideMovement;
}
}
}
menuViewController.view.frame = rect;
} }
- (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress - (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress
{ {
UIViewController *menuViewController = (menu == MenuLeft) UIViewController *menuViewController = (menu == MenuLeft)
? [SlideNavigationController sharedInstance].leftMenu ? [SlideNavigationController sharedInstance].leftMenu
: [SlideNavigationController sharedInstance].rightMenu; : [SlideNavigationController sharedInstance].rightMenu;
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation; UIInterfaceOrientation orientation = [SlideNavigationController sharedInstance].interfaceOrientation;
NSInteger location = (menu == MenuLeft) NSInteger location = (menu == MenuLeft)
? (self.slideMovement * -1) + (self.slideMovement * progress) ? (self.slideMovement * -1) + (self.slideMovement * progress)
: (self.slideMovement * (1-progress)); : (self.slideMovement * (1-progress));
if (menu == MenuLeft) if (menu == MenuLeft)
location = (location > 0) ? 0 : location; location = (location > 0) ? 0 : location;
if (menu == MenuRight) if (menu == MenuRight)
location = (location < 0) ? 0 : location; location = (location < 0) ? 0 : location;
CGRect rect = menuViewController.view.frame; CGRect rect = menuViewController.view.frame;
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1; rect.origin.x = location;
} }
else else
{ {
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1; if (UIInterfaceOrientationIsLandscape(orientation))
} {
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1;
menuViewController.view.frame = rect; }
else
{
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1;
}
}
menuViewController.view.frame = rect;
} }
- (void)clear - (void)clear
{ {
[self clearMenu:MenuLeft]; [self clearMenu:MenuLeft];
[self clearMenu:MenuRight]; [self clearMenu:MenuRight];
} }
#pragma mark - Private Method - #pragma mark - Private Method -
- (void)clearMenu:(Menu)menu - (void)clearMenu:(Menu)menu
{ {
UIViewController *menuViewController = (menu == MenuLeft) UIViewController *menuViewController = (menu == MenuLeft)
? [SlideNavigationController sharedInstance].leftMenu ? [SlideNavigationController sharedInstance].leftMenu
: [SlideNavigationController sharedInstance].rightMenu; : [SlideNavigationController sharedInstance].rightMenu;
UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation; UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation;
CGRect rect = menuViewController.view.frame; CGRect rect = menuViewController.view.frame;
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
rect.origin.y = 0; rect.origin.x = 0;
} }
else else
{ {
rect.origin.x = 0; if (UIInterfaceOrientationIsLandscape(orientation))
} {
rect.origin.y = 0;
menuViewController.view.frame = rect; }
else
{
rect.origin.x = 0;
}
}
menuViewController.view.frame = rect;
} }
@end @end

View File

@ -28,6 +28,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.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> @protocol SlideNavigationControllerDelegate <NSObject>
@optional @optional
- (BOOL)slideNavigationControllerShouldDisplayRightMenu; - (BOOL)slideNavigationControllerShouldDisplayRightMenu;
@ -42,6 +44,12 @@ typedef enum{
@protocol SlideNavigationContorllerAnimator; @protocol SlideNavigationContorllerAnimator;
@interface SlideNavigationController : UINavigationController <UINavigationControllerDelegate> @interface SlideNavigationController : UINavigationController <UINavigationControllerDelegate>
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 avoidSwitchingToSameClassViewController;
@property (nonatomic, assign) BOOL enableSwipeGesture; @property (nonatomic, assign) BOOL enableSwipeGesture;
@property (nonatomic, assign) BOOL enableShadow; @property (nonatomic, assign) BOOL enableShadow;
@ -52,6 +60,9 @@ typedef enum{
@property (nonatomic, assign) CGFloat portraitSlideOffset; @property (nonatomic, assign) CGFloat portraitSlideOffset;
@property (nonatomic, assign) CGFloat landscapeSlideOffset; @property (nonatomic, assign) CGFloat landscapeSlideOffset;
@property (nonatomic, assign) CGFloat panGestureSideOffset; @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; @property (nonatomic, strong) id <SlideNavigationContorllerAnimator> menuRevealAnimator;
+ (SlideNavigationController *)sharedInstance; + (SlideNavigationController *)sharedInstance;
@ -67,4 +78,6 @@ typedef enum{
- (void)toggleRightMenu; - (void)toggleRightMenu;
- (BOOL)isMenuOpen; - (BOOL)isMenuOpen;
- (void)prepareMenuForReveal:(Menu)menu;
@end @end

View File

@ -38,12 +38,21 @@ typedef enum {
@property (nonatomic, strong) UIPanGestureRecognizer *panRecognizer; @property (nonatomic, strong) UIPanGestureRecognizer *panRecognizer;
@property (nonatomic, assign) CGPoint draggingPoint; @property (nonatomic, assign) CGPoint draggingPoint;
@property (nonatomic, assign) Menu lastRevealedMenu; @property (nonatomic, assign) Menu lastRevealedMenu;
@property (nonatomic, assign) BOOL menuNeedsLayout;
@end @end
@implementation SlideNavigationController @implementation SlideNavigationController
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) NSString * const SlideNavigationControllerDidOpen = @"SlideNavigationControllerDidOpen";
NSString * const SlideNavigationControllerDidClose = @"SlideNavigationControllerDidClose";
NSString *const SlideNavigationControllerDidReveal = @"SlideNavigationControllerDidReveal";
NSString *const SlideMenuOpenAfterSwipeKey = @"SlideMenuOpenAfterSwipeKey";
#define MENU_SLIDE_ANIMATION_DURATION .3 #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_QUICK_SLIDE_ANIMATION_DURATION .18
#define MENU_IMAGE @"menu-button" #define MENU_IMAGE @"menu-button"
#define MENU_SHADOW_RADIUS 10 #define MENU_SHADOW_RADIUS 10
@ -51,6 +60,9 @@ typedef enum {
#define MENU_DEFAULT_SLIDE_OFFSET 60 #define MENU_DEFAULT_SLIDE_OFFSET 60
#define MENU_FAST_VELOCITY_FOR_SWIPE_FOLLOW_DIRECTION 1200 #define MENU_FAST_VELOCITY_FOR_SWIPE_FOLLOW_DIRECTION 1200
#define STATUS_BAR_HEIGHT 20 #define STATUS_BAR_HEIGHT 20
#define NOTIFICATION_USER_INFO_MENU_LEFT @"left"
#define NOTIFICATION_USER_INFO_MENU_RIGHT @"right"
#define NOTIFICATION_USER_INFO_MENU @"menu"
static SlideNavigationController *singletonInstance; static SlideNavigationController *singletonInstance;
@ -94,6 +106,16 @@ static SlideNavigationController *singletonInstance;
return self; return self;
} }
- (id)initWithNavigationBarClass:(Class)navigationBarClass toolbarClass:(Class)toolbarClass
{
if (self = [super initWithNavigationBarClass:navigationBarClass toolbarClass:toolbarClass])
{
[self setup];
}
return self;
}
- (void)setup - (void)setup
{ {
if (singletonInstance) if (singletonInstance)
@ -101,6 +123,9 @@ static SlideNavigationController *singletonInstance;
singletonInstance = self; 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.landscapeSlideOffset = MENU_DEFAULT_SLIDE_OFFSET;
self.portraitSlideOffset = MENU_DEFAULT_SLIDE_OFFSET; self.portraitSlideOffset = MENU_DEFAULT_SLIDE_OFFSET;
self.panGestureSideOffset = 0; self.panGestureSideOffset = 0;
@ -117,31 +142,39 @@ static SlideNavigationController *singletonInstance;
// Update shadow size of enabled // Update shadow size of enabled
if (self.enableShadow) if (self.enableShadow)
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds].CGPath; 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 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{ {
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration: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 self.menuNeedsLayout = YES;
{
[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;
} }
#pragma mark - Public Methods - #pragma mark - Public Methods -
@ -180,8 +213,7 @@ static SlideNavigationController *singletonInstance;
} }
- (void)switchToViewController:(UIViewController *)viewController - (void)switchToViewController:(UIViewController *)viewController
withSlideOutAnimation:(BOOL)slideOutAnimation popType:(PopType)poptype
popType:(PopType)poptype
andCompletion:(void (^)())completion andCompletion:(void (^)())completion
{ {
if (self.avoidSwitchingToSameClassViewController && [self.topViewController isKindOfClass:viewController.class]) if (self.avoidSwitchingToSameClassViewController && [self.topViewController isKindOfClass:viewController.class])
@ -189,95 +221,87 @@ static SlideNavigationController *singletonInstance;
[self closeMenuWithCompletion:completion]; [self closeMenuWithCompletion:completion];
return; return;
} }
void (^switchAndCallCompletion)(BOOL) = ^(BOOL closeMenuBeforeCallingCompletion) { void (^switchAndCallCompletion)(BOOL) = ^(BOOL closeMenuBeforeCallingCompletion) {
if (poptype == PopTypeAll) { if (poptype == PopTypeAll) {
[self setViewControllers:@[viewController]]; [self setViewControllers:@[viewController]];
} }
else { else {
[super popToRootViewControllerAnimated:NO]; [super popToRootViewControllerAnimated:NO];
[super pushViewController:viewController animated:NO]; [super pushViewController:viewController animated:NO];
} }
if (closeMenuBeforeCallingCompletion) if (closeMenuBeforeCallingCompletion)
{ {
[self closeMenuWithCompletion:^{ [self closeMenuWithCompletion:^{
if (completion) if (completion)
completion(); completion();
}]; }];
} }
else else
{ {
if (completion) if (completion)
completion(); completion();
} }
}; };
if ([self isMenuOpen]) // if ([self isMenuOpen])
{ // {
if (slideOutAnimation) // if (slideOutAnimation)
{ // {
[UIView animateWithDuration:(slideOutAnimation) ? MENU_SLIDE_ANIMATION_DURATION : 0 // [UIView animateWithDuration:(slideOutAnimation) ? self.menuRevealAnimationDuration : 0
delay:0 // delay:0
options:UIViewAnimationOptionCurveEaseOut // options:self.menuRevealAnimationOption
animations:^{ // animations:^{
CGFloat width = self.horizontalSize; // CGFloat width = self.horizontalSize;
CGFloat moveLocation = (self.horizontalLocation> 0) ? width : -1*width; // CGFloat moveLocation = (self.horizontalLocation> 0) ? width : -1*width;
[self moveHorizontallyToLocation:moveLocation]; // [self moveHorizontallyToLocation:moveLocation];
} completion:^(BOOL finished) { // } completion:^(BOOL finished) {
switchAndCallCompletion(YES); // switchAndCallCompletion(YES);
}]; // }];
} // }
else // else
{ // {
switchAndCallCompletion(YES); // switchAndCallCompletion(YES);
} // }
} // }
else // else
{ // {
switchAndCallCompletion(NO); // switchAndCallCompletion(NO);
} // }
switchAndCallCompletion([self isMenuOpen]);
} }
- (void)switchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion - (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 - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController
withSlideOutAnimation:(BOOL)slideOutAnimation withSlideOutAnimation:(BOOL)slideOutAnimation
andCompletion:(void (^)())completion andCompletion:(void (^)())completion
{ {
[self switchToViewController:viewController withSlideOutAnimation:slideOutAnimation popType:PopTypeRoot andCompletion:completion]; [self switchToViewController:viewController popType:PopTypeRoot andCompletion:completion];
} }
- (void)popToRootAndSwitchToViewController:(UIViewController *)viewController - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController
withCompletion:(void (^)())completion withCompletion:(void (^)())completion
{ {
[self switchToViewController:viewController withSlideOutAnimation:YES popType:PopTypeRoot andCompletion:completion]; [self switchToViewController:viewController popType:PopTypeRoot andCompletion:completion];
} }
- (void)popAllAndSwitchToViewController:(UIViewController *)viewController - (void)popAllAndSwitchToViewController:(UIViewController *)viewController
withSlideOutAnimation:(BOOL)slideOutAnimation withSlideOutAnimation:(BOOL)slideOutAnimation
andCompletion:(void (^)())completion andCompletion:(void (^)())completion
{ {
[self switchToViewController:viewController withSlideOutAnimation:slideOutAnimation popType:PopTypeAll andCompletion:completion]; [self switchToViewController:viewController popType:PopTypeAll andCompletion:completion];
} }
- (void)popAllAndSwitchToViewController:(UIViewController *)viewController - (void)popAllAndSwitchToViewController:(UIViewController *)viewController
withCompletion:(void (^)())completion withCompletion:(void (^)())completion
{ {
[self switchToViewController:viewController withSlideOutAnimation:YES popType:PopTypeAll andCompletion:completion]; [self switchToViewController:viewController 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];
} }
- (void)toggleLeftMenu - (void)toggleLeftMenu
@ -444,15 +468,30 @@ static SlideNavigationController *singletonInstance;
return NO; 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 enableTapGestureToCloseMenu:YES];
[self prepareMenuForReveal:menu]; [self prepareMenuForReveal:menu];
[UIView animateWithDuration:duration [UIView animateWithDuration:duration
delay:0 delay:0
options:UIViewAnimationOptionCurveEaseOut options:self.menuRevealAnimationOption
animations:^{ animations:^{
CGRect rect = self.view.frame; CGRect rect = self.view.frame;
CGFloat width = self.horizontalSize; CGFloat width = self.horizontalSize;
@ -462,16 +501,24 @@ static SlideNavigationController *singletonInstance;
completion:^(BOOL finished) { completion:^(BOOL finished) {
if (completion) if (completion)
completion(); completion();
[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]; [self enableTapGestureToCloseMenu:NO];
Menu menu = (self.horizontalLocation > 0) ? MenuLeft : MenuRight;
[UIView animateWithDuration:duration [UIView animateWithDuration:duration
delay:0 delay:0
options:UIViewAnimationOptionCurveEaseOut options:self.menuRevealAnimationOption
animations:^{ animations:^{
CGRect rect = self.view.frame; CGRect rect = self.view.frame;
rect.origin.x = 0; rect.origin.x = 0;
@ -480,6 +527,8 @@ static SlideNavigationController *singletonInstance;
completion:^(BOOL finished) { completion:^(BOOL finished) {
if (completion) if (completion)
completion(); completion();
[self postNotificationWithName:SlideNavigationControllerDidClose forMenu:menu];
}]; }];
} }
@ -488,17 +537,29 @@ static SlideNavigationController *singletonInstance;
CGRect rect = self.view.frame; CGRect rect = self.view.frame;
UIInterfaceOrientation orientation = self.interfaceOrientation; UIInterfaceOrientation orientation = self.interfaceOrientation;
Menu menu = (self.horizontalLocation >= 0 && location >= 0) ? MenuLeft : MenuRight; Menu menu = (self.horizontalLocation >= 0 && location >= 0) ? MenuLeft : MenuRight;
if ((location > 0 && self.horizontalLocation <= 0) || (location < 0 && self.horizontalLocation >= 0)) {
[self postNotificationWithName:SlideNavigationControllerDidReveal forMenu:(location > 0) ? MenuLeft : MenuRight];
}
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
rect.origin.x = 0; rect.origin.x = location;
rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1; rect.origin.y = 0;
} }
else else
{ {
rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1; if (UIInterfaceOrientationIsLandscape(orientation))
rect.origin.y = 0; {
} 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.view.frame = rect;
[self updateMenuAnimation:menu]; [self updateMenuAnimation:menu];
@ -519,25 +580,22 @@ static SlideNavigationController *singletonInstance;
rect.origin.x = 0; rect.origin.x = 0;
rect.origin.y = 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 (UIInterfaceOrientationIsLandscape(self.interfaceOrientation))
{ {
if (!isIos7) // 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;
// For some reasons in landscape belos the status bar is considered y=0, but in portrait it's considered y=20 rect.size.width = self.view.frame.size.width-STATUS_BAR_HEIGHT;
rect.origin.x = (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) ? 0 : STATUS_BAR_HEIGHT;
rect.size.width = self.view.frame.size.width-STATUS_BAR_HEIGHT;
}
} }
else else
{ {
if (!isIos7) // 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;
// For some reasons in landscape belos the status bar is considered y=0, but in portrait it's considered y=20 rect.size.height = self.view.frame.size.height-STATUS_BAR_HEIGHT;
rect.origin.y = (self.interfaceOrientation == UIInterfaceOrientationPortrait) ? STATUS_BAR_HEIGHT : 0;
rect.size.height = self.view.frame.size.height-STATUS_BAR_HEIGHT;
}
} }
return rect; return rect;
@ -567,18 +625,25 @@ static SlideNavigationController *singletonInstance;
CGRect rect = self.view.frame; CGRect rect = self.view.frame;
UIInterfaceOrientation orientation = self.interfaceOrientation; UIInterfaceOrientation orientation = self.interfaceOrientation;
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
return (orientation == UIInterfaceOrientationLandscapeRight) return rect.origin.x;
? rect.origin.y }
: rect.origin.y*-1; else
} {
else if (UIInterfaceOrientationIsLandscape(orientation))
{ {
return (orientation == UIInterfaceOrientationPortrait) return (orientation == UIInterfaceOrientationLandscapeRight)
? rect.origin.x ? rect.origin.y
: rect.origin.x*-1; : rect.origin.y*-1;
} }
else
{
return (orientation == UIInterfaceOrientationPortrait)
? rect.origin.x
: rect.origin.x*-1;
}
}
} }
- (CGFloat)horizontalSize - (CGFloat)horizontalSize
@ -586,27 +651,36 @@ static SlideNavigationController *singletonInstance;
CGRect rect = self.view.frame; CGRect rect = self.view.frame;
UIInterfaceOrientation orientation = self.interfaceOrientation; UIInterfaceOrientation orientation = self.interfaceOrientation;
if (UIInterfaceOrientationIsLandscape(orientation)) if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
{ {
return rect.size.height; return rect.size.width;
} }
else else
{ {
return rect.size.width; if (UIInterfaceOrientationIsLandscape(orientation))
} {
return rect.size.height;
}
else
{
return rect.size.width;
}
}
} }
#pragma mark - UINavigationControllerDelegate Methods - - (void)postNotificationWithName:(NSString *)name forMenu:(Menu)menu
- (void)navigationController:(UINavigationController *)navigationController
willShowViewController:(UIViewController *)viewController
animated:(BOOL)animated
{ {
if ([self shouldDisplayMenu:MenuLeft forViewController:viewController]) [self postNotificationWithName:name forMenu:menu withExtParams:nil];
viewController.navigationItem.leftBarButtonItem = [self barButtonItemForMenu:MenuLeft]; }
if ([self shouldDisplayMenu:MenuRight forViewController:viewController]) - (void)postNotificationWithName:(NSString *)name forMenu:(Menu)menu withExtParams:(NSDictionary *)extParams
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 - (CGFloat)slideOffset
@ -624,7 +698,6 @@ static SlideNavigationController *singletonInstance;
[self closeMenuWithCompletion:nil]; [self closeMenuWithCompletion:nil];
else else
[self openMenu:MenuLeft withCompletion:nil]; [self openMenu:MenuLeft withCompletion:nil];
} }
- (void)righttMenuSelected:(id)sender - (void)righttMenuSelected:(id)sender
@ -670,6 +743,9 @@ static SlideNavigationController *singletonInstance;
else else
currentMenu = (translation.x > 0) ? MenuLeft : MenuRight; currentMenu = (translation.x > 0) ? MenuLeft : MenuRight;
// if (![self shouldDisplayMenu:currentMenu forViewController:self.topViewController])
// return;
[self prepareMenuForReveal:currentMenu]; [self prepareMenuForReveal:currentMenu];
if (aPanRecognizer.state == UIGestureRecognizerStateBegan) if (aPanRecognizer.state == UIGestureRecognizerStateBegan)
@ -705,11 +781,11 @@ static SlideNavigationController *singletonInstance;
if (currentX > 0) if (currentX > 0)
{ {
if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController]) 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 else
{ {
[self closeMenuWithDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil]; [self closeMenuWithCompletion:nil];
} }
} }
// Moving Left // Moving Left
@ -717,12 +793,12 @@ static SlideNavigationController *singletonInstance;
{ {
if (currentX > 0) if (currentX > 0)
{ {
[self closeMenuWithDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil]; [self closeMenuWithCompletion:nil];
} }
else else
{ {
if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController]) 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];
} }
} }
} }
@ -731,7 +807,7 @@ static SlideNavigationController *singletonInstance;
if (currentXOffset < (self.horizontalSize - self.slideOffset)/2) if (currentXOffset < (self.horizontalSize - self.slideOffset)/2)
[self closeMenuWithCompletion:nil]; [self closeMenuWithCompletion:nil];
else else
[self openMenu:(currentX > 0) ? MenuLeft : MenuRight withCompletion:nil]; [self openMenu:(currentX > 0) ? MenuLeft : MenuRight afterSwipe:YES withCompletion:nil];
} }
} }
} }
@ -800,4 +876,18 @@ static SlideNavigationController *singletonInstance;
_menuRevealAnimator = menuRevealAnimator; _menuRevealAnimator = menuRevealAnimator;
} }
- (void)setLeftMenu:(UIViewController *)leftMenu
{
[_leftMenu.view removeFromSuperview];
_leftMenu = leftMenu;
}
- (void)setRightMenu:(UIViewController *)rightMenu
{
[_rightMenu.view removeFromSuperview];
_rightMenu = rightMenu;
}
@end @end

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?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> <dependencies>
<deployment defaultVersion="1536" identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Left Menu View Controller--> <!--Left Menu View Controller-->
@ -70,7 +70,7 @@
</objects> </objects>
<point key="canvasLocation" x="11" y="49"/> <point key="canvasLocation" x="11" y="49"/>
</scene> </scene>
<!--Home View Controller - Home--> <!--Home-->
<scene sceneID="7Hl-22-JcN"> <scene sceneID="7Hl-22-JcN">
<objects> <objects>
<viewController storyboardIdentifier="HomeViewController" id="mAB-md-uek" customClass="HomeViewController" sceneMemberID="viewController"> <viewController storyboardIdentifier="HomeViewController" id="mAB-md-uek" customClass="HomeViewController" sceneMemberID="viewController">
@ -227,7 +227,7 @@
</objects> </objects>
<point key="canvasLocation" x="1040" y="-222"/> <point key="canvasLocation" x="1040" y="-222"/>
</scene> </scene>
<!--View Controller - No Menu--> <!--No Menu-->
<scene sceneID="b5b-is-lY2"> <scene sceneID="b5b-is-lY2">
<objects> <objects>
<viewController id="Tha-f2-JWx" sceneMemberID="viewController"> <viewController id="Tha-f2-JWx" sceneMemberID="viewController">
@ -253,7 +253,7 @@
</objects> </objects>
<point key="canvasLocation" x="1503" y="-222"/> <point key="canvasLocation" x="1503" y="-222"/>
</scene> </scene>
<!--View Controller - Login--> <!--Login-->
<scene sceneID="fe8-Xu-DEa"> <scene sceneID="fe8-Xu-DEa">
<objects> <objects>
<viewController id="Rnc-YT-XEu" sceneMemberID="viewController"> <viewController id="Rnc-YT-XEu" sceneMemberID="viewController">
@ -289,13 +289,14 @@
<navigationItem key="navigationItem" title="Login" id="huN-S6-yGa"/> <navigationItem key="navigationItem" title="Login" id="huN-S6-yGa"/>
<connections> <connections>
<segue destination="nrg-5w-bbF" kind="push" identifier="FakeSegue" id="Rkp-YM-Gz0"/> <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> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="QC9-GK-F3v" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="QC9-GK-F3v" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="499" y="49"/> <point key="canvasLocation" x="499" y="49"/>
</scene> </scene>
<!--Profile View Controller - Profile--> <!--Profile-->
<scene sceneID="xeE-nX-pb6"> <scene sceneID="xeE-nX-pb6">
<objects> <objects>
<viewController storyboardIdentifier="ProfileViewController" id="nrg-5w-bbF" customClass="ProfileViewController" sceneMemberID="viewController"> <viewController storyboardIdentifier="ProfileViewController" id="nrg-5w-bbF" customClass="ProfileViewController" sceneMemberID="viewController">
@ -334,7 +335,7 @@
</objects> </objects>
<point key="canvasLocation" x="1044" y="437"/> <point key="canvasLocation" x="1044" y="437"/>
</scene> </scene>
<!--Friends View Controller - Friends--> <!--Friends-->
<scene sceneID="Hbs-BS-FvF"> <scene sceneID="Hbs-BS-FvF">
<objects> <objects>
<tableViewController storyboardIdentifier="FriendsViewController" title="Friends" id="qY1-Jo-UbZ" customClass="FriendsViewController" sceneMemberID="viewController"> <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"/> <outlet property="delegate" destination="qY1-Jo-UbZ" id="FT7-ey-Dka"/>
</connections> </connections>
</tableView> </tableView>
<navigationItem key="navigationItem" id="aah-ni-z8T">
<barButtonItem key="rightBarButtonItem" title="Random Button" id="UsL-My-2Pu"/>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
</tableViewController> </tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="TeQ-ZL-OLP" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="TeQ-ZL-OLP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1042" y="1101"/> <point key="canvasLocation" x="1042" y="1101"/>
</scene> </scene>
<!--View Controller - Friends--> <!--Friends-->
<scene sceneID="yJW-sY-3g9"> <scene sceneID="yJW-sY-3g9">
<objects> <objects>
<viewController title="Friends" id="yDw-XY-MRH" sceneMemberID="viewController"> <viewController title="Friends" id="yDw-XY-MRH" sceneMemberID="viewController">
@ -401,7 +405,7 @@
</objects> </objects>
<point key="canvasLocation" x="1503" y="1100"/> <point key="canvasLocation" x="1503" y="1100"/>
</scene> </scene>
<!--Profile Detail View Controller - Right Menu Only--> <!--Right Menu Only-->
<scene sceneID="w1a-xD-Zgv"> <scene sceneID="w1a-xD-Zgv">
<objects> <objects>
<viewController storyboardIdentifier="ProfileDetailViewController" id="BLR-mt-TZ9" customClass="ProfileDetailViewController" sceneMemberID="viewController"> <viewController storyboardIdentifier="ProfileDetailViewController" id="BLR-mt-TZ9" customClass="ProfileDetailViewController" sceneMemberID="viewController">
@ -473,4 +477,4 @@
<simulatedOrientationMetrics key="orientation"/> <simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/> <simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer> </simulatedMetricsContainer>
</document> </document>

View File

@ -6,8 +6,8 @@
// Copyright (c) 2013 Aryan Ghassemi. All rights reserved. // Copyright (c) 2013 Aryan Ghassemi. All rights reserved.
// //
#import <SenTestingKit/SenTestingKit.h> #import <XCTest/XCTest.h>
@interface SlideMenuTests : SenTestCase @interface SlideMenuTests : XCTestCase
@end @end

View File

@ -26,7 +26,7 @@
- (void)testExample - (void)testExample
{ {
STFail(@"Unit tests are not implemented yet in SlideMenuTests"); XCTFail(@"Unit tests are not implemented yet in SlideMenuTests");
} }
@end @end

View File

@ -1,16 +1,16 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'iOS-Slide-Menu' s.name = 'iOS-Slide-Menu'
s.version = '1.4.1' s.version = '1.4.6'
s.summary = 'A Slide Menu for iOS' s.summary = 'A Slide Menu for iOS'
s.homepage = 'https://github.com/aryaxt/iOS-Slide-Menu' s.homepage = 'https://github.com/aryaxt/iOS-Slide-Menu'
s.license = { s.license = {
:type => 'MIT', :type => 'MIT',
:file => 'License.txt' :file => 'License.txt'
} }
s.author = {'Aryan Gh' => 'https://github.com/aryaxt/iOS-Slide-Menu'} 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.1'} s.source = {:git => 'https://github.com/aryaxt/iOS-Slide-Menu.git', :tag => '1.4.6'}
s.platform = :ios, '6.0' 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.resources = ['SlideMenu/Source/Assets/**/*']
s.framework = 'Foundation', 'UIKit' s.framework = 'Foundation', 'UIKit'
s.requires_arc = true s.requires_arc = true