├── Demo.gif ├── Examples ├── Simple │ ├── RESideMenuExample.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── RESideMenuExample.xccheckout │ └── RESideMenuExample │ │ ├── DEMOAppDelegate.h │ │ ├── DEMOAppDelegate.m │ │ ├── DEMOFirstViewController.h │ │ ├── DEMOFirstViewController.m │ │ ├── DEMOLeftMenuViewController.h │ │ ├── DEMOLeftMenuViewController.m │ │ ├── DEMORightMenuViewController.h │ │ ├── DEMORightMenuViewController.m │ │ ├── DEMOSecondViewController.h │ │ ├── DEMOSecondViewController.m │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Balloon.imageset │ │ │ ├── Balloon@2x.png │ │ │ └── Contents.json │ │ ├── Icon.imageset │ │ │ ├── Contents.json │ │ │ └── Icon@2x.png │ │ ├── IconCalendar.imageset │ │ │ ├── Contents.json │ │ │ └── IconCalendar@2x.png │ │ ├── IconEmpty.imageset │ │ │ ├── Contents.json │ │ │ └── IconEmpty@2x.png │ │ ├── IconHome.imageset │ │ │ ├── Contents.json │ │ │ └── IconHome@2x.png │ │ ├── IconProfile.imageset │ │ │ ├── Contents.json │ │ │ └── IconProfile@2x.png │ │ ├── IconSettings.imageset │ │ │ ├── Contents.json │ │ │ └── IconSettings@2x.png │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-4.7.png │ │ │ ├── Default-5.5.png │ │ │ └── Default-568h@2x.png │ │ ├── MenuBackground.imageset │ │ │ ├── Contents.json │ │ │ └── MenuBackground@2x.png │ │ └── Stars.imageset │ │ │ ├── Contents.json │ │ │ └── Stars@2x.png │ │ ├── RESideMenuExample-Info.plist │ │ ├── RESideMenuExample-Prefix.pch │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ └── main.m └── Storyboards │ ├── RESideMenuStoryboardsExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── RESideMenuStoryboardsExample.xccheckout │ └── RESideMenuStoryboardsExample │ ├── Base.lproj │ └── Main.storyboard │ ├── DEMOAppDelegate.h │ ├── DEMOAppDelegate.m │ ├── DEMOFirstViewController.h │ ├── DEMOFirstViewController.m │ ├── DEMOLeftMenuViewController.h │ ├── DEMOLeftMenuViewController.m │ ├── DEMORightMenuViewController.h │ ├── DEMORightMenuViewController.m │ ├── DEMORootViewController.h │ ├── DEMORootViewController.m │ ├── DEMOSecondViewController.h │ ├── DEMOSecondViewController.m │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Balloon.imageset │ │ ├── Balloon@2x.png │ │ └── Contents.json │ ├── Icon.imageset │ │ ├── Contents.json │ │ └── Icon@2x.png │ ├── IconCalendar.imageset │ │ ├── Contents.json │ │ └── IconCalendar@2x.png │ ├── IconEmpty.imageset │ │ ├── Contents.json │ │ └── IconEmpty@2x.png │ ├── IconHome.imageset │ │ ├── Contents.json │ │ └── IconHome@2x.png │ ├── IconProfile.imageset │ │ ├── Contents.json │ │ └── IconProfile@2x.png │ ├── IconSettings.imageset │ │ ├── Contents.json │ │ └── IconSettings@2x.png │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-4.7.png │ │ ├── Default-5.5.png │ │ └── Default-568h@2x.png │ ├── MenuBackground.imageset │ │ ├── Contents.json │ │ └── MenuBackground@2x.png │ └── Stars.imageset │ │ ├── Contents.json │ │ └── Stars@2x.png │ ├── RESideMenuStoryboardsExample-Info.plist │ ├── RESideMenuStoryboardsExample-Prefix.pch │ ├── en.lproj │ └── InfoPlist.strings │ └── main.m ├── LICENSE ├── README.md ├── RESideMenu.podspec ├── RESideMenu ├── RECommonFunctions.h ├── RECommonFunctions.m ├── RESideMenu.h ├── RESideMenu.m ├── UIViewController+RESideMenu.h └── UIViewController+RESideMenu.m └── Screenshot.png /Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Demo.gif -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3032B9131807338200064F85 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3032B9121807338200064F85 /* Foundation.framework */; }; 11 | 3032B9151807338200064F85 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3032B9141807338200064F85 /* CoreGraphics.framework */; }; 12 | 3032B9171807338200064F85 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3032B9161807338200064F85 /* UIKit.framework */; }; 13 | 3032B91D1807338200064F85 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3032B91B1807338200064F85 /* InfoPlist.strings */; }; 14 | 3032B91F1807338200064F85 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3032B91E1807338200064F85 /* main.m */; }; 15 | 3032B9231807338200064F85 /* DEMOAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3032B9221807338200064F85 /* DEMOAppDelegate.m */; }; 16 | 3032B9251807338200064F85 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3032B9241807338200064F85 /* Images.xcassets */; }; 17 | 3032B954180736C900064F85 /* DEMOFirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3032B953180736C900064F85 /* DEMOFirstViewController.m */; }; 18 | 3032B958180736E200064F85 /* DEMOSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3032B957180736E200064F85 /* DEMOSecondViewController.m */; }; 19 | 3032B95E1807372B00064F85 /* DEMOLeftMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3032B95D1807372B00064F85 /* DEMOLeftMenuViewController.m */; }; 20 | 3076CE171809B5EF00527E6C /* RECommonFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE121809B5EF00527E6C /* RECommonFunctions.m */; }; 21 | 3076CE181809B5EF00527E6C /* RESideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE141809B5EF00527E6C /* RESideMenu.m */; }; 22 | 3076CE191809B5EF00527E6C /* UIViewController+RESideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE161809B5EF00527E6C /* UIViewController+RESideMenu.m */; }; 23 | 30FE3D1F18AB3B6A003F59ED /* DEMORightMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30FE3D1E18AB3B6A003F59ED /* DEMORightMenuViewController.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 3032B90F1807338200064F85 /* RESideMenuExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RESideMenuExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 3032B9121807338200064F85 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 3032B9141807338200064F85 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 3032B9161807338200064F85 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 31 | 3032B91A1807338200064F85 /* RESideMenuExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RESideMenuExample-Info.plist"; sourceTree = ""; }; 32 | 3032B91C1807338200064F85 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 3032B91E1807338200064F85 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 3032B9201807338200064F85 /* RESideMenuExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RESideMenuExample-Prefix.pch"; sourceTree = ""; }; 35 | 3032B9211807338200064F85 /* DEMOAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DEMOAppDelegate.h; sourceTree = ""; }; 36 | 3032B9221807338200064F85 /* DEMOAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DEMOAppDelegate.m; sourceTree = ""; }; 37 | 3032B9241807338200064F85 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 38 | 3032B92B1807338200064F85 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 39 | 3032B952180736C900064F85 /* DEMOFirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOFirstViewController.h; sourceTree = ""; }; 40 | 3032B953180736C900064F85 /* DEMOFirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOFirstViewController.m; sourceTree = ""; }; 41 | 3032B956180736E200064F85 /* DEMOSecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOSecondViewController.h; sourceTree = ""; }; 42 | 3032B957180736E200064F85 /* DEMOSecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOSecondViewController.m; sourceTree = ""; }; 43 | 3032B95C1807372B00064F85 /* DEMOLeftMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOLeftMenuViewController.h; sourceTree = ""; }; 44 | 3032B95D1807372B00064F85 /* DEMOLeftMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOLeftMenuViewController.m; sourceTree = ""; }; 45 | 3076CE111809B5EF00527E6C /* RECommonFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RECommonFunctions.h; sourceTree = ""; }; 46 | 3076CE121809B5EF00527E6C /* RECommonFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RECommonFunctions.m; sourceTree = ""; }; 47 | 3076CE131809B5EF00527E6C /* RESideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RESideMenu.h; sourceTree = ""; }; 48 | 3076CE141809B5EF00527E6C /* RESideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RESideMenu.m; sourceTree = ""; }; 49 | 3076CE151809B5EF00527E6C /* UIViewController+RESideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+RESideMenu.h"; sourceTree = ""; }; 50 | 3076CE161809B5EF00527E6C /* UIViewController+RESideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+RESideMenu.m"; sourceTree = ""; }; 51 | 30FE3D1D18AB3B6A003F59ED /* DEMORightMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMORightMenuViewController.h; sourceTree = ""; }; 52 | 30FE3D1E18AB3B6A003F59ED /* DEMORightMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMORightMenuViewController.m; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 3032B90C1807338200064F85 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 3032B9151807338200064F85 /* CoreGraphics.framework in Frameworks */, 61 | 3032B9171807338200064F85 /* UIKit.framework in Frameworks */, 62 | 3032B9131807338200064F85 /* Foundation.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 3032B9061807338200064F85 = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3076CE101809B5EF00527E6C /* RESideMenu */, 73 | 3032B9181807338200064F85 /* RESideMenuExample */, 74 | 3032B9111807338200064F85 /* Frameworks */, 75 | 3032B9101807338200064F85 /* Products */, 76 | ); 77 | sourceTree = ""; 78 | }; 79 | 3032B9101807338200064F85 /* Products */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 3032B90F1807338200064F85 /* RESideMenuExample.app */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | 3032B9111807338200064F85 /* Frameworks */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 3032B9121807338200064F85 /* Foundation.framework */, 91 | 3032B9141807338200064F85 /* CoreGraphics.framework */, 92 | 3032B9161807338200064F85 /* UIKit.framework */, 93 | 3032B92B1807338200064F85 /* XCTest.framework */, 94 | ); 95 | name = Frameworks; 96 | sourceTree = ""; 97 | }; 98 | 3032B9181807338200064F85 /* RESideMenuExample */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 3032B9211807338200064F85 /* DEMOAppDelegate.h */, 102 | 3032B9221807338200064F85 /* DEMOAppDelegate.m */, 103 | 3032B955180736CC00064F85 /* Controllers */, 104 | 3032B9191807338200064F85 /* Supporting Files */, 105 | ); 106 | path = RESideMenuExample; 107 | sourceTree = ""; 108 | }; 109 | 3032B9191807338200064F85 /* Supporting Files */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 3032B9241807338200064F85 /* Images.xcassets */, 113 | 3032B91A1807338200064F85 /* RESideMenuExample-Info.plist */, 114 | 3032B91B1807338200064F85 /* InfoPlist.strings */, 115 | 3032B91E1807338200064F85 /* main.m */, 116 | 3032B9201807338200064F85 /* RESideMenuExample-Prefix.pch */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | 3032B955180736CC00064F85 /* Controllers */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 3032B952180736C900064F85 /* DEMOFirstViewController.h */, 125 | 3032B953180736C900064F85 /* DEMOFirstViewController.m */, 126 | 3032B956180736E200064F85 /* DEMOSecondViewController.h */, 127 | 3032B957180736E200064F85 /* DEMOSecondViewController.m */, 128 | 3032B95C1807372B00064F85 /* DEMOLeftMenuViewController.h */, 129 | 3032B95D1807372B00064F85 /* DEMOLeftMenuViewController.m */, 130 | 30FE3D1D18AB3B6A003F59ED /* DEMORightMenuViewController.h */, 131 | 30FE3D1E18AB3B6A003F59ED /* DEMORightMenuViewController.m */, 132 | ); 133 | name = Controllers; 134 | sourceTree = ""; 135 | }; 136 | 3076CE101809B5EF00527E6C /* RESideMenu */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 3076CE111809B5EF00527E6C /* RECommonFunctions.h */, 140 | 3076CE121809B5EF00527E6C /* RECommonFunctions.m */, 141 | 3076CE131809B5EF00527E6C /* RESideMenu.h */, 142 | 3076CE141809B5EF00527E6C /* RESideMenu.m */, 143 | 3076CE151809B5EF00527E6C /* UIViewController+RESideMenu.h */, 144 | 3076CE161809B5EF00527E6C /* UIViewController+RESideMenu.m */, 145 | ); 146 | name = RESideMenu; 147 | path = ../../RESideMenu; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXGroup section */ 151 | 152 | /* Begin PBXNativeTarget section */ 153 | 3032B90E1807338200064F85 /* RESideMenuExample */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 3032B93B1807338200064F85 /* Build configuration list for PBXNativeTarget "RESideMenuExample" */; 156 | buildPhases = ( 157 | 3032B90B1807338200064F85 /* Sources */, 158 | 3032B90C1807338200064F85 /* Frameworks */, 159 | 3032B90D1807338200064F85 /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = RESideMenuExample; 166 | productName = RESideMenuExample; 167 | productReference = 3032B90F1807338200064F85 /* RESideMenuExample.app */; 168 | productType = "com.apple.product-type.application"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 3032B9071807338200064F85 /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | CLASSPREFIX = DEMO; 177 | LastUpgradeCheck = 0510; 178 | ORGANIZATIONNAME = "Roman Efimov"; 179 | }; 180 | buildConfigurationList = 3032B90A1807338200064F85 /* Build configuration list for PBXProject "RESideMenuExample" */; 181 | compatibilityVersion = "Xcode 3.2"; 182 | developmentRegion = English; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | ); 187 | mainGroup = 3032B9061807338200064F85; 188 | productRefGroup = 3032B9101807338200064F85 /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 3032B90E1807338200064F85 /* RESideMenuExample */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 3032B90D1807338200064F85 /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 3032B91D1807338200064F85 /* InfoPlist.strings in Resources */, 203 | 3032B9251807338200064F85 /* Images.xcassets in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXSourcesBuildPhase section */ 210 | 3032B90B1807338200064F85 /* Sources */ = { 211 | isa = PBXSourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 3076CE181809B5EF00527E6C /* RESideMenu.m in Sources */, 215 | 3032B954180736C900064F85 /* DEMOFirstViewController.m in Sources */, 216 | 3032B91F1807338200064F85 /* main.m in Sources */, 217 | 3032B95E1807372B00064F85 /* DEMOLeftMenuViewController.m in Sources */, 218 | 3032B9231807338200064F85 /* DEMOAppDelegate.m in Sources */, 219 | 3032B958180736E200064F85 /* DEMOSecondViewController.m in Sources */, 220 | 3076CE171809B5EF00527E6C /* RECommonFunctions.m in Sources */, 221 | 3076CE191809B5EF00527E6C /* UIViewController+RESideMenu.m in Sources */, 222 | 30FE3D1F18AB3B6A003F59ED /* DEMORightMenuViewController.m in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXVariantGroup section */ 229 | 3032B91B1807338200064F85 /* InfoPlist.strings */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | 3032B91C1807338200064F85 /* en */, 233 | ); 234 | name = InfoPlist.strings; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXVariantGroup section */ 238 | 239 | /* Begin XCBuildConfiguration section */ 240 | 3032B9391807338200064F85 /* Debug */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_MODULES = YES; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_WARN_BOOL_CONVERSION = YES; 249 | CLANG_WARN_CONSTANT_CONVERSION = YES; 250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 251 | CLANG_WARN_EMPTY_BODY = YES; 252 | CLANG_WARN_ENUM_CONVERSION = YES; 253 | CLANG_WARN_INT_CONVERSION = YES; 254 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_DYNAMIC_NO_PIC = NO; 260 | GCC_OPTIMIZATION_LEVEL = 0; 261 | GCC_PREPROCESSOR_DEFINITIONS = ( 262 | "DEBUG=1", 263 | "$(inherited)", 264 | ); 265 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 268 | GCC_WARN_UNDECLARED_SELECTOR = YES; 269 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 270 | GCC_WARN_UNUSED_FUNCTION = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 273 | ONLY_ACTIVE_ARCH = YES; 274 | SDKROOT = iphoneos; 275 | }; 276 | name = Debug; 277 | }; 278 | 3032B93A1807338200064F85 /* Release */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 283 | CLANG_CXX_LIBRARY = "libc++"; 284 | CLANG_ENABLE_MODULES = YES; 285 | CLANG_ENABLE_OBJC_ARC = YES; 286 | CLANG_WARN_BOOL_CONVERSION = YES; 287 | CLANG_WARN_CONSTANT_CONVERSION = YES; 288 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 289 | CLANG_WARN_EMPTY_BODY = YES; 290 | CLANG_WARN_ENUM_CONVERSION = YES; 291 | CLANG_WARN_INT_CONVERSION = YES; 292 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 295 | COPY_PHASE_STRIP = YES; 296 | ENABLE_NS_ASSERTIONS = NO; 297 | GCC_C_LANGUAGE_STANDARD = gnu99; 298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 300 | GCC_WARN_UNDECLARED_SELECTOR = YES; 301 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 302 | GCC_WARN_UNUSED_FUNCTION = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 305 | SDKROOT = iphoneos; 306 | VALIDATE_PRODUCT = YES; 307 | }; 308 | name = Release; 309 | }; 310 | 3032B93C1807338200064F85 /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 314 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 315 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 316 | GCC_PREFIX_HEADER = "RESideMenuExample/RESideMenuExample-Prefix.pch"; 317 | INFOPLIST_FILE = "RESideMenuExample/RESideMenuExample-Info.plist"; 318 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 319 | PRODUCT_NAME = "$(TARGET_NAME)"; 320 | TARGETED_DEVICE_FAMILY = "1,2"; 321 | WRAPPER_EXTENSION = app; 322 | }; 323 | name = Debug; 324 | }; 325 | 3032B93D1807338200064F85 /* Release */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 329 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 330 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 331 | GCC_PREFIX_HEADER = "RESideMenuExample/RESideMenuExample-Prefix.pch"; 332 | INFOPLIST_FILE = "RESideMenuExample/RESideMenuExample-Info.plist"; 333 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 334 | PRODUCT_NAME = "$(TARGET_NAME)"; 335 | TARGETED_DEVICE_FAMILY = "1,2"; 336 | WRAPPER_EXTENSION = app; 337 | }; 338 | name = Release; 339 | }; 340 | /* End XCBuildConfiguration section */ 341 | 342 | /* Begin XCConfigurationList section */ 343 | 3032B90A1807338200064F85 /* Build configuration list for PBXProject "RESideMenuExample" */ = { 344 | isa = XCConfigurationList; 345 | buildConfigurations = ( 346 | 3032B9391807338200064F85 /* Debug */, 347 | 3032B93A1807338200064F85 /* Release */, 348 | ); 349 | defaultConfigurationIsVisible = 0; 350 | defaultConfigurationName = Release; 351 | }; 352 | 3032B93B1807338200064F85 /* Build configuration list for PBXNativeTarget "RESideMenuExample" */ = { 353 | isa = XCConfigurationList; 354 | buildConfigurations = ( 355 | 3032B93C1807338200064F85 /* Debug */, 356 | 3032B93D1807338200064F85 /* Release */, 357 | ); 358 | defaultConfigurationIsVisible = 0; 359 | defaultConfigurationName = Release; 360 | }; 361 | /* End XCConfigurationList section */ 362 | }; 363 | rootObject = 3032B9071807338200064F85 /* Project object */; 364 | } 365 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample.xcodeproj/project.xcworkspace/xcshareddata/RESideMenuExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | EA2AA090-2EDD-4770-A786-8CEB4C372394 9 | IDESourceControlProjectName 10 | RESideMenuExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 14 | ssh://github.com/romaonthego/RESideMenu.git 15 | 16 | IDESourceControlProjectPath 17 | Examples/Simple/RESideMenuExample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 21 | ../../../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/romaonthego/RESideMenu.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 36 | IDESourceControlWCCName 37 | RESideMenu 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOAppDelegate.h 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOAppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOAppDelegate.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOAppDelegate.h" 10 | #import "DEMOLeftMenuViewController.h" 11 | #import "DEMORightMenuViewController.h" 12 | #import "DEMOFirstViewController.h" 13 | 14 | @implementation DEMOAppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 19 | 20 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:[[DEMOFirstViewController alloc] init]]; 21 | DEMOLeftMenuViewController *leftMenuViewController = [[DEMOLeftMenuViewController alloc] init]; 22 | DEMORightMenuViewController *rightMenuViewController = [[DEMORightMenuViewController alloc] init]; 23 | 24 | RESideMenu *sideMenuViewController = [[RESideMenu alloc] initWithContentViewController:navigationController 25 | leftMenuViewController:leftMenuViewController 26 | rightMenuViewController:rightMenuViewController]; 27 | sideMenuViewController.backgroundImage = [UIImage imageNamed:@"Stars"]; 28 | sideMenuViewController.menuPreferredStatusBarStyle = 1; // UIStatusBarStyleLightContent 29 | sideMenuViewController.delegate = self; 30 | sideMenuViewController.contentViewShadowColor = [UIColor blackColor]; 31 | sideMenuViewController.contentViewShadowOffset = CGSizeMake(0, 0); 32 | sideMenuViewController.contentViewShadowOpacity = 0.6; 33 | sideMenuViewController.contentViewShadowRadius = 12; 34 | sideMenuViewController.contentViewShadowEnabled = YES; 35 | self.window.rootViewController = sideMenuViewController; 36 | 37 | self.window.backgroundColor = [UIColor whiteColor]; 38 | [self.window makeKeyAndVisible]; 39 | return YES; 40 | } 41 | 42 | #pragma mark - 43 | #pragma mark RESideMenu Delegate 44 | 45 | - (void)sideMenu:(RESideMenu *)sideMenu willShowMenuViewController:(UIViewController *)menuViewController 46 | { 47 | NSLog(@"willShowMenuViewController: %@", NSStringFromClass([menuViewController class])); 48 | } 49 | 50 | - (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController 51 | { 52 | NSLog(@"didShowMenuViewController: %@", NSStringFromClass([menuViewController class])); 53 | } 54 | 55 | - (void)sideMenu:(RESideMenu *)sideMenu willHideMenuViewController:(UIViewController *)menuViewController 56 | { 57 | NSLog(@"willHideMenuViewController: %@", NSStringFromClass([menuViewController class])); 58 | } 59 | 60 | - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController 61 | { 62 | NSLog(@"didHideMenuViewController: %@", NSStringFromClass([menuViewController class])); 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOFirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOFirstViewController.h 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOFirstViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOFirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOFirstViewController.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOFirstViewController.h" 10 | 11 | @interface DEMOFirstViewController () 12 | 13 | @end 14 | 15 | @implementation DEMOFirstViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | self.title = @"First Controller"; 21 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Left" 22 | style:UIBarButtonItemStylePlain 23 | target:self 24 | action:@selector(presentLeftMenuViewController:)]; 25 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Right" 26 | style:UIBarButtonItemStylePlain 27 | target:self 28 | action:@selector(presentRightMenuViewController:)]; 29 | 30 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; 31 | imageView.contentMode = UIViewContentModeScaleAspectFill; 32 | imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 33 | imageView.image = [UIImage imageNamed:@"Balloon"]; 34 | [self.view addSubview:imageView]; 35 | } 36 | 37 | - (void)viewWillAppear:(BOOL)animated 38 | { 39 | [super viewWillAppear:animated]; 40 | NSLog(@"DEMOFirstViewController will appear"); 41 | } 42 | 43 | - (void)viewWillDisappear:(BOOL)animated 44 | { 45 | [super viewWillDisappear:animated]; 46 | NSLog(@"DEMOFirstViewController will disappear"); 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOLeftMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOMenuViewController.h 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOLeftMenuViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOLeftMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOMenuViewController.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOLeftMenuViewController.h" 10 | #import "DEMOFirstViewController.h" 11 | #import "DEMOSecondViewController.h" 12 | 13 | @interface DEMOLeftMenuViewController () 14 | 15 | @property (strong, readwrite, nonatomic) UITableView *tableView; 16 | 17 | @end 18 | 19 | @implementation DEMOLeftMenuViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | self.tableView = ({ 25 | UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, (self.view.frame.size.height - 54 * 5) / 2.0f, self.view.frame.size.width, 54 * 5) style:UITableViewStylePlain]; 26 | tableView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; 27 | tableView.delegate = self; 28 | tableView.dataSource = self; 29 | tableView.opaque = NO; 30 | tableView.backgroundColor = [UIColor clearColor]; 31 | tableView.backgroundView = nil; 32 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 33 | tableView.bounces = NO; 34 | tableView; 35 | }); 36 | [self.view addSubview:self.tableView]; 37 | } 38 | 39 | #pragma mark - 40 | #pragma mark UITableView Delegate 41 | 42 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 43 | { 44 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 45 | switch (indexPath.row) { 46 | case 0: 47 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[[DEMOFirstViewController alloc] init]] 48 | animated:YES]; 49 | [self.sideMenuViewController hideMenuViewController]; 50 | break; 51 | case 1: 52 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[[DEMOSecondViewController alloc] init]] 53 | animated:YES]; 54 | [self.sideMenuViewController hideMenuViewController]; 55 | break; 56 | default: 57 | break; 58 | } 59 | } 60 | 61 | #pragma mark - 62 | #pragma mark UITableView Datasource 63 | 64 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 65 | { 66 | return 54; 67 | } 68 | 69 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 70 | { 71 | return 1; 72 | } 73 | 74 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex 75 | { 76 | return 5; 77 | } 78 | 79 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 80 | { 81 | static NSString *cellIdentifier = @"Cell"; 82 | 83 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 84 | 85 | if (cell == nil) { 86 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 87 | cell.backgroundColor = [UIColor clearColor]; 88 | cell.textLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:21]; 89 | cell.textLabel.textColor = [UIColor whiteColor]; 90 | cell.textLabel.highlightedTextColor = [UIColor lightGrayColor]; 91 | cell.selectedBackgroundView = [[UIView alloc] init]; 92 | } 93 | 94 | NSArray *titles = @[@"Home", @"Calendar", @"Profile", @"Settings", @"Log Out"]; 95 | NSArray *images = @[@"IconHome", @"IconCalendar", @"IconProfile", @"IconSettings", @"IconEmpty"]; 96 | cell.textLabel.text = titles[indexPath.row]; 97 | cell.imageView.image = [UIImage imageNamed:images[indexPath.row]]; 98 | 99 | return cell; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMORightMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMORightMenuViewController.h 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 2/11/14. 6 | // Copyright (c) 2014 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMORightMenuViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMORightMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMORightMenuViewController.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 2/11/14. 6 | // Copyright (c) 2014 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMORightMenuViewController.h" 10 | #import "DEMOFirstViewController.h" 11 | #import "DEMOSecondViewController.h" 12 | #import "DEMOLeftMenuViewController.h" 13 | 14 | @interface DEMORightMenuViewController () 15 | 16 | @property (strong, readwrite, nonatomic) UITableView *tableView; 17 | 18 | @end 19 | 20 | @implementation DEMORightMenuViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | self.tableView = ({ 26 | UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, (self.view.frame.size.height - 54 * 2) / 2.0f, self.view.frame.size.width, 54 * 2) style:UITableViewStylePlain]; 27 | tableView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; 28 | tableView.delegate = self; 29 | tableView.dataSource = self; 30 | tableView.opaque = NO; 31 | tableView.backgroundColor = [UIColor clearColor]; 32 | tableView.backgroundView = nil; 33 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 34 | tableView.bounces = NO; 35 | tableView; 36 | }); 37 | [self.view addSubview:self.tableView]; 38 | } 39 | 40 | #pragma mark - 41 | #pragma mark UITableView Delegate 42 | 43 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 44 | { 45 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 46 | switch (indexPath.row) { 47 | case 0: 48 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[[DEMOFirstViewController alloc] init]] 49 | animated:YES]; 50 | [self.sideMenuViewController hideMenuViewController]; 51 | break; 52 | case 1: 53 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[[DEMOSecondViewController alloc] init]] 54 | animated:YES]; 55 | [self.sideMenuViewController hideMenuViewController]; 56 | break; 57 | default: 58 | break; 59 | } 60 | } 61 | 62 | #pragma mark - 63 | #pragma mark UITableView Datasource 64 | 65 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 66 | { 67 | return 54; 68 | } 69 | 70 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 71 | { 72 | return 1; 73 | } 74 | 75 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex 76 | { 77 | return 2; 78 | } 79 | 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 81 | { 82 | static NSString *cellIdentifier = @"Cell"; 83 | 84 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 85 | 86 | if (cell == nil) { 87 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 88 | cell.backgroundColor = [UIColor clearColor]; 89 | cell.textLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:21]; 90 | cell.textLabel.textColor = [UIColor whiteColor]; 91 | cell.textLabel.highlightedTextColor = [UIColor lightGrayColor]; 92 | cell.selectedBackgroundView = [[UIView alloc] init]; 93 | } 94 | 95 | NSArray *titles = @[@"Test 1", @"Test 2"]; 96 | cell.textLabel.text = titles[indexPath.row]; 97 | cell.textLabel.textAlignment = NSTextAlignmentRight; 98 | 99 | return cell; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOSecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOSecondViewController.h 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOSecondViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/DEMOSecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOSecondViewController.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOSecondViewController.h" 10 | 11 | @implementation DEMOSecondViewController 12 | 13 | - (void)viewDidLoad 14 | { 15 | [super viewDidLoad]; 16 | self.title = @"Second Controller"; 17 | self.view.backgroundColor = [UIColor colorWithRed:255/255.0 green:202/255.0 blue:101/255.0 alpha:1.0]; 18 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Left" 19 | style:UIBarButtonItemStylePlain 20 | target:self 21 | action:@selector(presentLeftMenuViewController:)]; 22 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Right" 23 | style:UIBarButtonItemStylePlain 24 | target:self 25 | action:@selector(presentRightMenuViewController:)]; 26 | 27 | [self.view addSubview:({ 28 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 29 | button.frame = CGRectMake(0, 84, self.view.frame.size.width, 44); 30 | button.autoresizingMask = UIViewAutoresizingFlexibleWidth; 31 | [button setTitle:@"Push View Controller" forState:UIControlStateNormal]; 32 | [button addTarget:self action:@selector(pushViewController:) forControlEvents:UIControlEventTouchUpInside]; 33 | button; 34 | })]; 35 | } 36 | 37 | - (void)pushViewController:(id)sender 38 | { 39 | UIViewController *viewController = [[UIViewController alloc] init]; 40 | viewController.title = @"Pushed Controller"; 41 | viewController.view.backgroundColor = [UIColor whiteColor]; 42 | [self.navigationController pushViewController:viewController animated:YES]; 43 | } 44 | 45 | - (void)viewWillAppear:(BOOL)animated 46 | { 47 | [super viewWillAppear:animated]; 48 | NSLog(@"DEMOSecondViewController will appear"); 49 | } 50 | 51 | - (void)viewWillDisappear:(BOOL)animated 52 | { 53 | [super viewWillDisappear:animated]; 54 | NSLog(@"DEMOSecondViewController will disappear"); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Balloon.imageset/Balloon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/Balloon.imageset/Balloon@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Balloon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Balloon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Icon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Icon.imageset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/Icon.imageset/Icon@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconCalendar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconCalendar@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconCalendar.imageset/IconCalendar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/IconCalendar.imageset/IconCalendar@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconEmpty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconEmpty@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconEmpty.imageset/IconEmpty@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/IconEmpty.imageset/IconEmpty@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconHome.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconHome@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconHome.imageset/IconHome@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/IconHome.imageset/IconHome@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconProfile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconProfile@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconProfile.imageset/IconProfile@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/IconProfile.imageset/IconProfile@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconSettings.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconSettings@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/IconSettings.imageset/IconSettings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/IconSettings.imageset/IconSettings@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-5.5.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "667h", 16 | "filename" : "Default-4.7.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "orientation" : "portrait", 23 | "idiom" : "iphone", 24 | "extent" : "full-screen", 25 | "minimum-system-version" : "7.0", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "extent" : "full-screen", 30 | "idiom" : "iphone", 31 | "subtype" : "retina4", 32 | "filename" : "Default-568h@2x.png", 33 | "minimum-system-version" : "7.0", 34 | "orientation" : "portrait", 35 | "scale" : "2x" 36 | } 37 | ], 38 | "info" : { 39 | "version" : 1, 40 | "author" : "xcode" 41 | } 42 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-4.7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-4.7.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-5.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-5.5.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/MenuBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "MenuBackground@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/MenuBackground.imageset/MenuBackground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/MenuBackground.imageset/MenuBackground@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Stars.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Stars@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/Images.xcassets/Stars.imageset/Stars@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Simple/RESideMenuExample/Images.xcassets/Stars.imageset/Stars@2x.png -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/RESideMenuExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Side Menu 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.romanefimov.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarStyle 32 | UIStatusBarStyleBlackOpaque 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/RESideMenuExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples/Simple/RESideMenuExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RESideMenuExample 4 | // 5 | // Created by Roman Efimov on 10/10/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DEMOAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([DEMOAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3076CDC21809B47200527E6C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3076CDC11809B47200527E6C /* Foundation.framework */; }; 11 | 3076CDC41809B47200527E6C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3076CDC31809B47200527E6C /* CoreGraphics.framework */; }; 12 | 3076CDC61809B47200527E6C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3076CDC51809B47200527E6C /* UIKit.framework */; }; 13 | 3076CDCC1809B47200527E6C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3076CDCA1809B47200527E6C /* InfoPlist.strings */; }; 14 | 3076CDCE1809B47200527E6C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CDCD1809B47200527E6C /* main.m */; }; 15 | 3076CDD21809B47200527E6C /* DEMOAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CDD11809B47200527E6C /* DEMOAppDelegate.m */; }; 16 | 3076CDD51809B47200527E6C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3076CDD31809B47200527E6C /* Main.storyboard */; }; 17 | 3076CDDA1809B47200527E6C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3076CDD91809B47200527E6C /* Images.xcassets */; }; 18 | 3076CE011809B59E00527E6C /* DEMOFirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CDF81809B59E00527E6C /* DEMOFirstViewController.m */; }; 19 | 3076CE021809B59E00527E6C /* DEMOLeftMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CDFA1809B59E00527E6C /* DEMOLeftMenuViewController.m */; }; 20 | 3076CE041809B59E00527E6C /* DEMORootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CDFE1809B59E00527E6C /* DEMORootViewController.m */; }; 21 | 3076CE051809B59E00527E6C /* DEMOSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE001809B59E00527E6C /* DEMOSecondViewController.m */; }; 22 | 3076CE0D1809B5C500527E6C /* RECommonFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE081809B5C400527E6C /* RECommonFunctions.m */; }; 23 | 3076CE0E1809B5C500527E6C /* RESideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE0A1809B5C500527E6C /* RESideMenu.m */; }; 24 | 3076CE0F1809B5C500527E6C /* UIViewController+RESideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3076CE0C1809B5C500527E6C /* UIViewController+RESideMenu.m */; }; 25 | 30DF13B218DE1B0C0018463C /* DEMORightMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DF13B118DE1B0C0018463C /* DEMORightMenuViewController.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 3076CDBE1809B47200527E6C /* RESideMenuStoryboardsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RESideMenuStoryboardsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 3076CDC11809B47200527E6C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 31 | 3076CDC31809B47200527E6C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 32 | 3076CDC51809B47200527E6C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 33 | 3076CDC91809B47200527E6C /* RESideMenuStoryboardsExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RESideMenuStoryboardsExample-Info.plist"; sourceTree = ""; }; 34 | 3076CDCB1809B47200527E6C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 35 | 3076CDCD1809B47200527E6C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 36 | 3076CDCF1809B47200527E6C /* RESideMenuStoryboardsExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RESideMenuStoryboardsExample-Prefix.pch"; sourceTree = ""; }; 37 | 3076CDD01809B47200527E6C /* DEMOAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DEMOAppDelegate.h; sourceTree = ""; }; 38 | 3076CDD11809B47200527E6C /* DEMOAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DEMOAppDelegate.m; sourceTree = ""; }; 39 | 3076CDD41809B47200527E6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 3076CDD91809B47200527E6C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 3076CDE01809B47200527E6C /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 42 | 3076CDF71809B59E00527E6C /* DEMOFirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOFirstViewController.h; sourceTree = ""; }; 43 | 3076CDF81809B59E00527E6C /* DEMOFirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOFirstViewController.m; sourceTree = ""; }; 44 | 3076CDF91809B59E00527E6C /* DEMOLeftMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOLeftMenuViewController.h; sourceTree = ""; }; 45 | 3076CDFA1809B59E00527E6C /* DEMOLeftMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOLeftMenuViewController.m; sourceTree = ""; }; 46 | 3076CDFD1809B59E00527E6C /* DEMORootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMORootViewController.h; sourceTree = ""; }; 47 | 3076CDFE1809B59E00527E6C /* DEMORootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMORootViewController.m; sourceTree = ""; }; 48 | 3076CDFF1809B59E00527E6C /* DEMOSecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMOSecondViewController.h; sourceTree = ""; }; 49 | 3076CE001809B59E00527E6C /* DEMOSecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMOSecondViewController.m; sourceTree = ""; }; 50 | 3076CE071809B5C400527E6C /* RECommonFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RECommonFunctions.h; sourceTree = ""; }; 51 | 3076CE081809B5C400527E6C /* RECommonFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RECommonFunctions.m; sourceTree = ""; }; 52 | 3076CE091809B5C400527E6C /* RESideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RESideMenu.h; sourceTree = ""; }; 53 | 3076CE0A1809B5C500527E6C /* RESideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RESideMenu.m; sourceTree = ""; }; 54 | 3076CE0B1809B5C500527E6C /* UIViewController+RESideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+RESideMenu.h"; sourceTree = ""; }; 55 | 3076CE0C1809B5C500527E6C /* UIViewController+RESideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+RESideMenu.m"; sourceTree = ""; }; 56 | 30DF13B018DE1B0C0018463C /* DEMORightMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DEMORightMenuViewController.h; sourceTree = ""; }; 57 | 30DF13B118DE1B0C0018463C /* DEMORightMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DEMORightMenuViewController.m; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 3076CDBB1809B47200527E6C /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 3076CDC41809B47200527E6C /* CoreGraphics.framework in Frameworks */, 66 | 3076CDC61809B47200527E6C /* UIKit.framework in Frameworks */, 67 | 3076CDC21809B47200527E6C /* Foundation.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 3076CDB51809B47200527E6C = { 75 | isa = PBXGroup; 76 | children = ( 77 | 3076CE061809B5C400527E6C /* RESideMenu */, 78 | 3076CDC71809B47200527E6C /* RESideMenuStoryboardsExample */, 79 | 3076CDC01809B47200527E6C /* Frameworks */, 80 | 3076CDBF1809B47200527E6C /* Products */, 81 | ); 82 | sourceTree = ""; 83 | }; 84 | 3076CDBF1809B47200527E6C /* Products */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 3076CDBE1809B47200527E6C /* RESideMenuStoryboardsExample.app */, 88 | ); 89 | name = Products; 90 | sourceTree = ""; 91 | }; 92 | 3076CDC01809B47200527E6C /* Frameworks */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 3076CDC11809B47200527E6C /* Foundation.framework */, 96 | 3076CDC31809B47200527E6C /* CoreGraphics.framework */, 97 | 3076CDC51809B47200527E6C /* UIKit.framework */, 98 | 3076CDE01809B47200527E6C /* XCTest.framework */, 99 | ); 100 | name = Frameworks; 101 | sourceTree = ""; 102 | }; 103 | 3076CDC71809B47200527E6C /* RESideMenuStoryboardsExample */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 3076CDF61809B50100527E6C /* Controllers */, 107 | 3076CDD01809B47200527E6C /* DEMOAppDelegate.h */, 108 | 3076CDD11809B47200527E6C /* DEMOAppDelegate.m */, 109 | 3076CDD31809B47200527E6C /* Main.storyboard */, 110 | 3076CDC81809B47200527E6C /* Supporting Files */, 111 | ); 112 | path = RESideMenuStoryboardsExample; 113 | sourceTree = ""; 114 | }; 115 | 3076CDC81809B47200527E6C /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 3076CDD91809B47200527E6C /* Images.xcassets */, 119 | 3076CDC91809B47200527E6C /* RESideMenuStoryboardsExample-Info.plist */, 120 | 3076CDCA1809B47200527E6C /* InfoPlist.strings */, 121 | 3076CDCD1809B47200527E6C /* main.m */, 122 | 3076CDCF1809B47200527E6C /* RESideMenuStoryboardsExample-Prefix.pch */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | 3076CDF61809B50100527E6C /* Controllers */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 3076CDFD1809B59E00527E6C /* DEMORootViewController.h */, 131 | 3076CDFE1809B59E00527E6C /* DEMORootViewController.m */, 132 | 3076CDF71809B59E00527E6C /* DEMOFirstViewController.h */, 133 | 3076CDF81809B59E00527E6C /* DEMOFirstViewController.m */, 134 | 3076CDFF1809B59E00527E6C /* DEMOSecondViewController.h */, 135 | 3076CE001809B59E00527E6C /* DEMOSecondViewController.m */, 136 | 3076CDF91809B59E00527E6C /* DEMOLeftMenuViewController.h */, 137 | 3076CDFA1809B59E00527E6C /* DEMOLeftMenuViewController.m */, 138 | 30DF13B018DE1B0C0018463C /* DEMORightMenuViewController.h */, 139 | 30DF13B118DE1B0C0018463C /* DEMORightMenuViewController.m */, 140 | ); 141 | name = Controllers; 142 | sourceTree = ""; 143 | }; 144 | 3076CE061809B5C400527E6C /* RESideMenu */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 3076CE071809B5C400527E6C /* RECommonFunctions.h */, 148 | 3076CE081809B5C400527E6C /* RECommonFunctions.m */, 149 | 3076CE091809B5C400527E6C /* RESideMenu.h */, 150 | 3076CE0A1809B5C500527E6C /* RESideMenu.m */, 151 | 3076CE0B1809B5C500527E6C /* UIViewController+RESideMenu.h */, 152 | 3076CE0C1809B5C500527E6C /* UIViewController+RESideMenu.m */, 153 | ); 154 | name = RESideMenu; 155 | path = ../../RESideMenu; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXGroup section */ 159 | 160 | /* Begin PBXNativeTarget section */ 161 | 3076CDBD1809B47200527E6C /* RESideMenuStoryboardsExample */ = { 162 | isa = PBXNativeTarget; 163 | buildConfigurationList = 3076CDF01809B47200527E6C /* Build configuration list for PBXNativeTarget "RESideMenuStoryboardsExample" */; 164 | buildPhases = ( 165 | 3076CDBA1809B47200527E6C /* Sources */, 166 | 3076CDBB1809B47200527E6C /* Frameworks */, 167 | 3076CDBC1809B47200527E6C /* Resources */, 168 | ); 169 | buildRules = ( 170 | ); 171 | dependencies = ( 172 | ); 173 | name = RESideMenuStoryboardsExample; 174 | productName = RESideMenuStoryboardsExample; 175 | productReference = 3076CDBE1809B47200527E6C /* RESideMenuStoryboardsExample.app */; 176 | productType = "com.apple.product-type.application"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | 3076CDB61809B47200527E6C /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | CLASSPREFIX = DEMO; 185 | LastUpgradeCheck = 0510; 186 | ORGANIZATIONNAME = "Roman Efimov"; 187 | }; 188 | buildConfigurationList = 3076CDB91809B47200527E6C /* Build configuration list for PBXProject "RESideMenuStoryboardsExample" */; 189 | compatibilityVersion = "Xcode 3.2"; 190 | developmentRegion = English; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = 3076CDB51809B47200527E6C; 197 | productRefGroup = 3076CDBF1809B47200527E6C /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 3076CDBD1809B47200527E6C /* RESideMenuStoryboardsExample */, 202 | ); 203 | }; 204 | /* End PBXProject section */ 205 | 206 | /* Begin PBXResourcesBuildPhase section */ 207 | 3076CDBC1809B47200527E6C /* Resources */ = { 208 | isa = PBXResourcesBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | 3076CDDA1809B47200527E6C /* Images.xcassets in Resources */, 212 | 3076CDCC1809B47200527E6C /* InfoPlist.strings in Resources */, 213 | 3076CDD51809B47200527E6C /* Main.storyboard in Resources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | 3076CDBA1809B47200527E6C /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 3076CE021809B59E00527E6C /* DEMOLeftMenuViewController.m in Sources */, 225 | 3076CE011809B59E00527E6C /* DEMOFirstViewController.m in Sources */, 226 | 3076CDCE1809B47200527E6C /* main.m in Sources */, 227 | 3076CDD21809B47200527E6C /* DEMOAppDelegate.m in Sources */, 228 | 3076CE051809B59E00527E6C /* DEMOSecondViewController.m in Sources */, 229 | 30DF13B218DE1B0C0018463C /* DEMORightMenuViewController.m in Sources */, 230 | 3076CE041809B59E00527E6C /* DEMORootViewController.m in Sources */, 231 | 3076CE0F1809B5C500527E6C /* UIViewController+RESideMenu.m in Sources */, 232 | 3076CE0E1809B5C500527E6C /* RESideMenu.m in Sources */, 233 | 3076CE0D1809B5C500527E6C /* RECommonFunctions.m in Sources */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | /* End PBXSourcesBuildPhase section */ 238 | 239 | /* Begin PBXVariantGroup section */ 240 | 3076CDCA1809B47200527E6C /* InfoPlist.strings */ = { 241 | isa = PBXVariantGroup; 242 | children = ( 243 | 3076CDCB1809B47200527E6C /* en */, 244 | ); 245 | name = InfoPlist.strings; 246 | sourceTree = ""; 247 | }; 248 | 3076CDD31809B47200527E6C /* Main.storyboard */ = { 249 | isa = PBXVariantGroup; 250 | children = ( 251 | 3076CDD41809B47200527E6C /* Base */, 252 | ); 253 | name = Main.storyboard; 254 | sourceTree = ""; 255 | }; 256 | /* End PBXVariantGroup section */ 257 | 258 | /* Begin XCBuildConfiguration section */ 259 | 3076CDEE1809B47200527E6C /* Debug */ = { 260 | isa = XCBuildConfiguration; 261 | buildSettings = { 262 | ALWAYS_SEARCH_USER_PATHS = NO; 263 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 264 | CLANG_CXX_LIBRARY = "libc++"; 265 | CLANG_ENABLE_MODULES = YES; 266 | CLANG_ENABLE_OBJC_ARC = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_CONSTANT_CONVERSION = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INT_CONVERSION = YES; 273 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | GCC_C_LANGUAGE_STANDARD = gnu99; 278 | GCC_DYNAMIC_NO_PIC = NO; 279 | GCC_OPTIMIZATION_LEVEL = 0; 280 | GCC_PREPROCESSOR_DEFINITIONS = ( 281 | "DEBUG=1", 282 | "$(inherited)", 283 | ); 284 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 285 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 286 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 287 | GCC_WARN_UNDECLARED_SELECTOR = YES; 288 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 289 | GCC_WARN_UNUSED_FUNCTION = YES; 290 | GCC_WARN_UNUSED_VARIABLE = YES; 291 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 292 | ONLY_ACTIVE_ARCH = YES; 293 | SDKROOT = iphoneos; 294 | }; 295 | name = Debug; 296 | }; 297 | 3076CDEF1809B47200527E6C /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 302 | CLANG_CXX_LIBRARY = "libc++"; 303 | CLANG_ENABLE_MODULES = YES; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_CONSTANT_CONVERSION = YES; 307 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 308 | CLANG_WARN_EMPTY_BODY = YES; 309 | CLANG_WARN_ENUM_CONVERSION = YES; 310 | CLANG_WARN_INT_CONVERSION = YES; 311 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 313 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 314 | COPY_PHASE_STRIP = YES; 315 | ENABLE_NS_ASSERTIONS = NO; 316 | GCC_C_LANGUAGE_STANDARD = gnu99; 317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 319 | GCC_WARN_UNDECLARED_SELECTOR = YES; 320 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 321 | GCC_WARN_UNUSED_FUNCTION = YES; 322 | GCC_WARN_UNUSED_VARIABLE = YES; 323 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 324 | SDKROOT = iphoneos; 325 | VALIDATE_PRODUCT = YES; 326 | }; 327 | name = Release; 328 | }; 329 | 3076CDF11809B47200527E6C /* Debug */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 333 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 334 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 335 | GCC_PREFIX_HEADER = "RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Prefix.pch"; 336 | INFOPLIST_FILE = "RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Info.plist"; 337 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 338 | PRODUCT_NAME = "$(TARGET_NAME)"; 339 | TARGETED_DEVICE_FAMILY = "1,2"; 340 | WRAPPER_EXTENSION = app; 341 | }; 342 | name = Debug; 343 | }; 344 | 3076CDF21809B47200527E6C /* Release */ = { 345 | isa = XCBuildConfiguration; 346 | buildSettings = { 347 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 348 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 349 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 350 | GCC_PREFIX_HEADER = "RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Prefix.pch"; 351 | INFOPLIST_FILE = "RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Info.plist"; 352 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 353 | PRODUCT_NAME = "$(TARGET_NAME)"; 354 | TARGETED_DEVICE_FAMILY = "1,2"; 355 | WRAPPER_EXTENSION = app; 356 | }; 357 | name = Release; 358 | }; 359 | /* End XCBuildConfiguration section */ 360 | 361 | /* Begin XCConfigurationList section */ 362 | 3076CDB91809B47200527E6C /* Build configuration list for PBXProject "RESideMenuStoryboardsExample" */ = { 363 | isa = XCConfigurationList; 364 | buildConfigurations = ( 365 | 3076CDEE1809B47200527E6C /* Debug */, 366 | 3076CDEF1809B47200527E6C /* Release */, 367 | ); 368 | defaultConfigurationIsVisible = 0; 369 | defaultConfigurationName = Release; 370 | }; 371 | 3076CDF01809B47200527E6C /* Build configuration list for PBXNativeTarget "RESideMenuStoryboardsExample" */ = { 372 | isa = XCConfigurationList; 373 | buildConfigurations = ( 374 | 3076CDF11809B47200527E6C /* Debug */, 375 | 3076CDF21809B47200527E6C /* Release */, 376 | ); 377 | defaultConfigurationIsVisible = 0; 378 | defaultConfigurationName = Release; 379 | }; 380 | /* End XCConfigurationList section */ 381 | }; 382 | rootObject = 3076CDB61809B47200527E6C /* Project object */; 383 | } 384 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample.xcodeproj/project.xcworkspace/xcshareddata/RESideMenuStoryboardsExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 3879733F-3A95-4277-B781-69031D14BC32 9 | IDESourceControlProjectName 10 | RESideMenuStoryboardsExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 14 | ssh://github.com/romaonthego/RESideMenu.git 15 | 16 | IDESourceControlProjectPath 17 | Examples/Storyboards/RESideMenuStoryboardsExample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 21 | ../../../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/romaonthego/RESideMenu.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 4D9AE519C7D7E765CA7498EFD8B3BB24ACB11215 36 | IDESourceControlWCCName 37 | RESideMenu 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOAppDelegate.h 3 | // RESideMenuStoryboardsExample 4 | // 5 | // Created by Roman Efimov on 10/12/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DEMOAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOAppDelegate.m 3 | // RESideMenuStoryboardsExample 4 | // 5 | // Created by Roman Efimov on 10/12/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOAppDelegate.h" 10 | 11 | @implementation DEMOAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOFirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOFirstViewController.h 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOFirstViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOFirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOFirstViewController.m 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOFirstViewController.h" 10 | 11 | @interface DEMOFirstViewController () 12 | 13 | @end 14 | 15 | @implementation DEMOFirstViewController 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOLeftMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOLeftMenuViewController.h 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOLeftMenuViewController : UIViewController 13 | 14 | @end -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOLeftMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOLeftMenuViewController.m 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOLeftMenuViewController.h" 10 | #import "DEMOFirstViewController.h" 11 | #import "DEMOSecondViewController.h" 12 | #import "UIViewController+RESideMenu.h" 13 | 14 | @interface DEMOLeftMenuViewController () 15 | 16 | @property (strong, readwrite, nonatomic) UITableView *tableView; 17 | 18 | @end 19 | 20 | @implementation DEMOLeftMenuViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | self.tableView = ({ 26 | UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, (self.view.frame.size.height - 54 * 5) / 2.0f, self.view.frame.size.width, 54 * 5) style:UITableViewStylePlain]; 27 | tableView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; 28 | tableView.delegate = self; 29 | tableView.dataSource = self; 30 | tableView.opaque = NO; 31 | tableView.backgroundColor = [UIColor clearColor]; 32 | tableView.backgroundView = nil; 33 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 34 | tableView.bounces = NO; 35 | tableView.scrollsToTop = NO; 36 | tableView; 37 | }); 38 | [self.view addSubview:self.tableView]; 39 | } 40 | 41 | #pragma mark - 42 | #pragma mark UITableView Delegate 43 | 44 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 45 | { 46 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 47 | switch (indexPath.row) { 48 | case 0: 49 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"firstViewController"]] 50 | animated:YES]; 51 | [self.sideMenuViewController hideMenuViewController]; 52 | break; 53 | case 1: 54 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"]] 55 | animated:YES]; 56 | [self.sideMenuViewController hideMenuViewController]; 57 | break; 58 | default: 59 | break; 60 | } 61 | } 62 | 63 | #pragma mark - 64 | #pragma mark UITableView Datasource 65 | 66 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 67 | { 68 | return 54; 69 | } 70 | 71 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 72 | { 73 | return 1; 74 | } 75 | 76 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex 77 | { 78 | return 5; 79 | } 80 | 81 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 82 | { 83 | static NSString *cellIdentifier = @"Cell"; 84 | 85 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 86 | 87 | if (cell == nil) { 88 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 89 | cell.backgroundColor = [UIColor clearColor]; 90 | cell.textLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:21]; 91 | cell.textLabel.textColor = [UIColor whiteColor]; 92 | cell.textLabel.highlightedTextColor = [UIColor lightGrayColor]; 93 | cell.selectedBackgroundView = [[UIView alloc] init]; 94 | } 95 | 96 | NSArray *titles = @[@"Home", @"Calendar", @"Profile", @"Settings", @"Log Out"]; 97 | NSArray *images = @[@"IconHome", @"IconCalendar", @"IconProfile", @"IconSettings", @"IconEmpty"]; 98 | cell.textLabel.text = titles[indexPath.row]; 99 | cell.imageView.image = [UIImage imageNamed:images[indexPath.row]]; 100 | 101 | return cell; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMORightMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMORightMenuViewController.h 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 2/11/14. 6 | // Copyright (c) 2014 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMORightMenuViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMORightMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMORightMenuViewController.m 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 2/11/14. 6 | // Copyright (c) 2014 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMORightMenuViewController.h" 10 | #import "DEMOFirstViewController.h" 11 | #import "DEMOSecondViewController.h" 12 | #import "DEMOLeftMenuViewController.h" 13 | 14 | @interface DEMORightMenuViewController () 15 | 16 | @property (strong, readwrite, nonatomic) UITableView *tableView; 17 | 18 | @end 19 | 20 | @implementation DEMORightMenuViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | self.tableView = ({ 26 | UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, (self.view.frame.size.height - 54 * 2) / 2.0f, self.view.frame.size.width, 54 * 2) style:UITableViewStylePlain]; 27 | tableView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; 28 | tableView.delegate = self; 29 | tableView.dataSource = self; 30 | tableView.opaque = NO; 31 | tableView.backgroundColor = [UIColor clearColor]; 32 | tableView.backgroundView = nil; 33 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 34 | tableView.bounces = NO; 35 | tableView; 36 | }); 37 | [self.view addSubview:self.tableView]; 38 | } 39 | 40 | #pragma mark - 41 | #pragma mark UITableView Delegate 42 | 43 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 44 | { 45 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 46 | switch (indexPath.row) { 47 | case 0: 48 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"firstViewController"]] 49 | animated:YES]; 50 | [self.sideMenuViewController hideMenuViewController]; 51 | break; 52 | case 1: 53 | [self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"]] 54 | animated:YES]; 55 | [self.sideMenuViewController hideMenuViewController]; 56 | break; 57 | default: 58 | break; 59 | } 60 | } 61 | 62 | #pragma mark - 63 | #pragma mark UITableView Datasource 64 | 65 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 66 | { 67 | return 54; 68 | } 69 | 70 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 71 | { 72 | return 1; 73 | } 74 | 75 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex 76 | { 77 | return 2; 78 | } 79 | 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 81 | { 82 | static NSString *cellIdentifier = @"Cell"; 83 | 84 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 85 | 86 | if (cell == nil) { 87 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 88 | cell.backgroundColor = [UIColor clearColor]; 89 | cell.textLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:21]; 90 | cell.textLabel.textColor = [UIColor whiteColor]; 91 | cell.textLabel.highlightedTextColor = [UIColor lightGrayColor]; 92 | cell.selectedBackgroundView = [[UIView alloc] init]; 93 | } 94 | 95 | NSArray *titles = @[@"Test 1", @"Test 2"]; 96 | cell.textLabel.text = titles[indexPath.row]; 97 | cell.textLabel.textAlignment = NSTextAlignmentRight; 98 | 99 | return cell; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMORootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOViewController.h 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMORootViewController : RESideMenu 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMORootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOViewController.m 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMORootViewController.h" 10 | #import "DEMOLeftMenuViewController.h" 11 | 12 | @interface DEMORootViewController () 13 | 14 | @end 15 | 16 | @implementation DEMORootViewController 17 | 18 | - (void)awakeFromNib 19 | { 20 | self.menuPreferredStatusBarStyle = UIStatusBarStyleLightContent; 21 | self.contentViewShadowColor = [UIColor blackColor]; 22 | self.contentViewShadowOffset = CGSizeMake(0, 0); 23 | self.contentViewShadowOpacity = 0.6; 24 | self.contentViewShadowRadius = 12; 25 | self.contentViewShadowEnabled = YES; 26 | 27 | self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"]; 28 | self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"leftMenuViewController"]; 29 | self.rightMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"rightMenuViewController"]; 30 | self.backgroundImage = [UIImage imageNamed:@"Stars"]; 31 | self.delegate = self; 32 | } 33 | 34 | #pragma mark - 35 | #pragma mark RESideMenu Delegate 36 | 37 | - (void)sideMenu:(RESideMenu *)sideMenu willShowMenuViewController:(UIViewController *)menuViewController 38 | { 39 | NSLog(@"willShowMenuViewController: %@", NSStringFromClass([menuViewController class])); 40 | } 41 | 42 | - (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController 43 | { 44 | NSLog(@"didShowMenuViewController: %@", NSStringFromClass([menuViewController class])); 45 | } 46 | 47 | - (void)sideMenu:(RESideMenu *)sideMenu willHideMenuViewController:(UIViewController *)menuViewController 48 | { 49 | NSLog(@"willHideMenuViewController: %@", NSStringFromClass([menuViewController class])); 50 | } 51 | 52 | - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController 53 | { 54 | NSLog(@"didHideMenuViewController: %@", NSStringFromClass([menuViewController class])); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOSecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOSecondViewController.h 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RESideMenu.h" 11 | 12 | @interface DEMOSecondViewController : UIViewController 13 | 14 | - (IBAction)pushViewController:(id)sender; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/DEMOSecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DEMOSecondViewController.m 3 | // RESideMenuStoryboards 4 | // 5 | // Created by Roman Efimov on 10/9/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "DEMOSecondViewController.h" 10 | 11 | @interface DEMOSecondViewController () 12 | 13 | @end 14 | 15 | @implementation DEMOSecondViewController 16 | 17 | - (IBAction)pushViewController:(id)sender 18 | { 19 | UIViewController *viewController = [[UIViewController alloc] init]; 20 | viewController.title = @"Pushed Controller"; 21 | viewController.view.backgroundColor = [UIColor whiteColor]; 22 | [self.navigationController pushViewController:viewController animated:YES]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Balloon.imageset/Balloon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Balloon.imageset/Balloon@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Balloon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Balloon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Icon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Icon.imageset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Icon.imageset/Icon@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconCalendar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconCalendar@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconCalendar.imageset/IconCalendar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconCalendar.imageset/IconCalendar@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconEmpty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconEmpty@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconEmpty.imageset/IconEmpty@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconEmpty.imageset/IconEmpty@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconHome.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconHome@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconHome.imageset/IconHome@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconHome.imageset/IconHome@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconProfile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconProfile@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconProfile.imageset/IconProfile@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconProfile.imageset/IconProfile@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconSettings.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconSettings@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconSettings.imageset/IconSettings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/IconSettings.imageset/IconSettings@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-5.5.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "667h", 16 | "filename" : "Default-4.7.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "orientation" : "portrait", 23 | "idiom" : "iphone", 24 | "extent" : "full-screen", 25 | "minimum-system-version" : "7.0", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "extent" : "full-screen", 30 | "idiom" : "iphone", 31 | "subtype" : "retina4", 32 | "filename" : "Default-568h@2x.png", 33 | "minimum-system-version" : "7.0", 34 | "orientation" : "portrait", 35 | "scale" : "2x" 36 | } 37 | ], 38 | "info" : { 39 | "version" : 1, 40 | "author" : "xcode" 41 | } 42 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-4.7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-4.7.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-5.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-5.5.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/MenuBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "MenuBackground@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/MenuBackground.imageset/MenuBackground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/MenuBackground.imageset/MenuBackground@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Stars.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Stars@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Stars.imageset/Stars@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Examples/Storyboards/RESideMenuStoryboardsExample/Images.xcassets/Stars.imageset/Stars@2x.png -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | Roman-Efimov.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/RESideMenuStoryboardsExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples/Storyboards/RESideMenuStoryboardsExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RESideMenuStoryboardsExample 4 | // 5 | // Created by Roman Efimov on 10/12/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DEMOAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([DEMOAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RESideMenu 2 | 3 | iOS 7/8 style side menu with parallax effect inspired by Dribbble shots ([first](http://dribbble.com/shots/1116265-Instasave-iPhone-App) and [second](http://dribbble.com/shots/1114754-Social-Feed-iOS7)). 4 | 5 | Since version 4.0 you can add menu view controllers on both left and right sides of your content view controller. 6 | 7 | RESideMenu Screenshot 8 | RESideMenu Screenshot 9 | 10 | ## Requirements 11 | * Xcode 6 or higher 12 | * Apple LLVM compiler 13 | * iOS 6.0 or higher 14 | * ARC 15 | 16 | ## Demo 17 | 18 | Build and run the `RESideMenuExample` project in Xcode to see `RESideMenu` in action. For storyboards integration demo, build and run `RESideMenuStoryboardsExample`. 19 | 20 | ## Installation 21 | 22 | ### CocoaPods 23 | 24 | The recommended approach for installating `RESideMenu` is via the [CocoaPods](http://cocoapods.org/) package manager, as it provides flexible dependency management and dead simple installation. 25 | For best results, it is recommended that you install via CocoaPods >= **0.28.0** using Git >= **1.8.0** installed via Homebrew. 26 | 27 | Install CocoaPods if not already available: 28 | 29 | ``` bash 30 | $ [sudo] gem install cocoapods 31 | $ pod setup 32 | ``` 33 | 34 | Change to the directory of your Xcode project: 35 | 36 | ``` bash 37 | $ cd /path/to/MyProject 38 | $ touch Podfile 39 | $ edit Podfile 40 | ``` 41 | 42 | Edit your Podfile and add RESideMenu: 43 | 44 | ``` bash 45 | platform :ios, '6.0' 46 | pod 'RESideMenu', '~> 4.0.7' 47 | ``` 48 | 49 | Install into your Xcode project: 50 | 51 | ``` bash 52 | $ pod install 53 | ``` 54 | 55 | Open your project in Xcode from the .xcworkspace file (not the usual project file) 56 | 57 | ``` bash 58 | $ open MyProject.xcworkspace 59 | ``` 60 | 61 | Please note that if your installation fails, it may be because you are installing with a version of Git lower than CocoaPods is expecting. Please ensure that you are running Git >= **1.8.0** by executing `git --version`. You can get a full picture of the installation details by executing `pod install --verbose`. 62 | 63 | ### Manual Install 64 | 65 | All you need to do is drop `RESideMenu` files into your project, and add `#include "RESideMenu.h"` to the top of classes that will use it. 66 | 67 | ## Example Usage 68 | 69 | In your AppDelegate's `- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` create the view controller and assign content and menu view controllers. 70 | 71 | ``` objective-c 72 | // Create content and menu controllers 73 | // 74 | DEMONavigationController *navigationController = [[DEMONavigationController alloc] initWithRootViewController:[[DEMOHomeViewController alloc] init]]; 75 | DEMOLeftMenuViewController *leftMenuViewController = [[DEMOLeftMenuViewController alloc] init]; 76 | DEMORightMenuViewController *rightMenuViewController = [[DEMORightMenuViewController alloc] init]; 77 | 78 | // Create side menu controller 79 | // 80 | RESideMenu *sideMenuViewController = [[RESideMenu alloc] initWithContentViewController:navigationController 81 | leftMenuViewController:leftMenuViewController 82 | rightMenuViewController:rightMenuViewController]; 83 | sideMenuViewController.backgroundImage = [UIImage imageNamed:@"Stars"]; 84 | 85 | // Make it a root controller 86 | // 87 | self.window.rootViewController = sideMenuViewController; 88 | ``` 89 | 90 | Present the menu view controller: 91 | 92 | ```objective-c 93 | [self.sideMenuViewController presentLeftMenuViewController]; 94 | ``` 95 | 96 | or 97 | 98 | ```objective-c 99 | [self.sideMenuViewController presentRightMenuViewController]; 100 | ``` 101 | 102 | Switch content view controllers: 103 | 104 | ```objective-c 105 | #import 106 | 107 | .... 108 | 109 | [self.sideMenuViewController setContentViewController:viewController animated:YES]; 110 | [self.sideMenuViewController hideMenuViewController]; 111 | ``` 112 | 113 | ## Storyboards Example 114 | 115 | 1. Create a subclass of `RESideMenu`. In this example we call it `DEMORootViewController`. 116 | 2. In the Storyboard designate the root view's owner as `DEMORootViewController`. 117 | 3. Make sure to `#import "RESideMenu.h"` in `DEMORootViewController.h`. 118 | 4. Add more view controllers to your Storyboard, and give them identifiers "leftMenuViewController", "rightMenuViewController" and "contentViewController". Note that in the new XCode the identifier is called "Storyboard ID" and can be found in the Identity inspector. 119 | 5. Add a method `awakeFromNib` to `DEMORootViewController.m` with the following code: 120 | 121 | ```objective-c 122 | - (void)awakeFromNib 123 | { 124 | self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"]; 125 | self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"leftMenuViewController"]; 126 | self.rightMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"rightMenuViewController"]; 127 | } 128 | ``` 129 | 130 | ## Customization 131 | 132 | You can customize the following properties of `RESideMenu`: 133 | 134 | ``` objective-c 135 | @property (assign, readwrite, nonatomic) NSTimeInterval animationDuration; 136 | @property (strong, readwrite, nonatomic) UIImage *backgroundImage; 137 | @property (assign, readwrite, nonatomic) BOOL panGestureEnabled; 138 | @property (assign, readwrite, nonatomic) BOOL panFromEdge; 139 | @property (assign, readwrite, nonatomic) NSUInteger panMinimumOpenThreshold; 140 | @property (assign, readwrite, nonatomic) BOOL interactivePopGestureRecognizerEnabled; 141 | @property (assign, readwrite, nonatomic) BOOL scaleContentView; 142 | @property (assign, readwrite, nonatomic) BOOL scaleBackgroundImageView; 143 | @property (assign, readwrite, nonatomic) BOOL scaleMenuView; 144 | @property (assign, readwrite, nonatomic) BOOL contentViewShadowEnabled; 145 | @property (assign, readwrite, nonatomic) UIColor *contentViewShadowColor; 146 | @property (assign, readwrite, nonatomic) CGSize contentViewShadowOffset; 147 | @property (assign, readwrite, nonatomic) CGFloat contentViewShadowOpacity; 148 | @property (assign, readwrite, nonatomic) CGFloat contentViewShadowRadius; 149 | @property (assign, readwrite, nonatomic) CGFloat contentViewScaleValue; 150 | @property (assign, readwrite, nonatomic) CGFloat contentViewInLandscapeOffsetCenterX; 151 | @property (assign, readwrite, nonatomic) CGFloat contentViewInPortraitOffsetCenterX; 152 | @property (assign, readwrite, nonatomic) CGFloat parallaxMenuMinimumRelativeValue; 153 | @property (assign, readwrite, nonatomic) CGFloat parallaxMenuMaximumRelativeValue; 154 | @property (assign, readwrite, nonatomic) CGFloat parallaxContentMinimumRelativeValue; 155 | @property (assign, readwrite, nonatomic) CGFloat parallaxContentMaximumRelativeValue; 156 | @property (assign, readwrite, nonatomic) CGAffineTransform menuViewControllerTransformation; 157 | @property (assign, readwrite, nonatomic) BOOL parallaxEnabled; 158 | @property (assign, readwrite, nonatomic) BOOL bouncesHorizontally; 159 | @property (assign, readwrite, nonatomic) UIStatusBarStyle menuPreferredStatusBarStyle; 160 | @property (assign, readwrite, nonatomic) BOOL menuPrefersStatusBarHidden; 161 | ``` 162 | 163 | If you set a backgroundImage, don't forget to set the Menu View Controller's background color to clear color. 164 | 165 | You can implement `RESideMenuDelegate` protocol to receive the following messages: 166 | 167 | ```objective-c 168 | - (void)sideMenu:(RESideMenu *)sideMenu didRecognizePanGesture:(UIPanGestureRecognizer *)recognizer; 169 | - (void)sideMenu:(RESideMenu *)sideMenu willShowMenuViewController:(UIViewController *)menuViewController; 170 | - (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController; 171 | - (void)sideMenu:(RESideMenu *)sideMenu willHideMenuViewController:(UIViewController *)menuViewController; 172 | - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController; 173 | ``` 174 | 175 | ## Contact 176 | 177 | Roman Efimov 178 | 179 | - https://github.com/romaonthego 180 | - https://twitter.com/romaonthego 181 | - romefimov@gmail.com 182 | 183 | ## License 184 | 185 | RESideMenu is available under the MIT license. 186 | 187 | Copyright © 2013 Roman Efimov. 188 | 189 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 190 | 191 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 192 | 193 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 194 | -------------------------------------------------------------------------------- /RESideMenu.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'RESideMenu' 3 | s.version = '4.0.7' 4 | s.authors = { 'Roman Efimov' => 'romefimov@gmail.com' } 5 | s.homepage = 'https://github.com/romaonthego/RESideMenu' 6 | s.summary = 'iOS 7 style side menu with parallax effect.' 7 | s.source = { :git => 'https://github.com/romaonthego/RESideMenu.git', 8 | :tag => s.version.to_s } 9 | s.license = { :type => "MIT", :file => "LICENSE" } 10 | 11 | s.platform = :ios, '6.0' 12 | s.requires_arc = true 13 | s.source_files = 'RESideMenu' 14 | s.public_header_files = 'RESideMenu/*.h' 15 | 16 | s.ios.deployment_target = '6.0' 17 | s.ios.frameworks = 'QuartzCore' 18 | end 19 | -------------------------------------------------------------------------------- /RESideMenu/RECommonFunctions.h: -------------------------------------------------------------------------------- 1 | // 2 | // RECommonFunctions.h 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | 29 | #ifndef REUIKitIsFlatMode 30 | #define REUIKitIsFlatMode() RESideMenuUIKitIsFlatMode() 31 | #endif 32 | 33 | #ifndef kCFCoreFoundationVersionNumber_iOS_6_1 34 | #define kCFCoreFoundationVersionNumber_iOS_6_1 793.00 35 | #endif 36 | 37 | #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1 38 | #define IF_IOS7_OR_GREATER(...) \ 39 | if (kCFCoreFoundationVersionNumber > kCFCoreFoundationVersionNumber_iOS_6_1) \ 40 | { \ 41 | __VA_ARGS__ \ 42 | } 43 | #else 44 | #define IF_IOS7_OR_GREATER(...) 45 | #endif 46 | 47 | BOOL RESideMenuUIKitIsFlatMode(void); -------------------------------------------------------------------------------- /RESideMenu/RECommonFunctions.m: -------------------------------------------------------------------------------- 1 | // 2 | // RECommonFunctions.m 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RECommonFunctions.h" 27 | #import 28 | 29 | BOOL RESideMenuUIKitIsFlatMode(void) 30 | { 31 | static BOOL isUIKitFlatMode = NO; 32 | static dispatch_once_t onceToken; 33 | dispatch_once(&onceToken, ^{ 34 | if (floor(NSFoundationVersionNumber) > 993.0) { 35 | // If your app is running in legacy mode, tintColor will be nil - else it must be set to some color. 36 | if (UIApplication.sharedApplication.keyWindow) { 37 | isUIKitFlatMode = [UIApplication.sharedApplication.delegate.window performSelector:@selector(tintColor)] != nil; 38 | } else { 39 | // Possible that we're called early on (e.g. when used in a Storyboard). Adapt and use a temporary window. 40 | isUIKitFlatMode = [[UIWindow new] performSelector:@selector(tintColor)] != nil; 41 | } 42 | } 43 | }); 44 | return isUIKitFlatMode; 45 | } -------------------------------------------------------------------------------- /RESideMenu/RESideMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // REFrostedViewController.h 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "UIViewController+RESideMenu.h" 28 | 29 | #ifndef IBInspectable 30 | #define IBInspectable 31 | #endif 32 | 33 | @protocol RESideMenuDelegate; 34 | 35 | @interface RESideMenu : UIViewController 36 | 37 | #if __IPHONE_8_0 38 | @property (strong, readwrite, nonatomic) IBInspectable NSString *contentViewStoryboardID; 39 | @property (strong, readwrite, nonatomic) IBInspectable NSString *leftMenuViewStoryboardID; 40 | @property (strong, readwrite, nonatomic) IBInspectable NSString *rightMenuViewStoryboardID; 41 | #endif 42 | 43 | @property (strong, readwrite, nonatomic) UIViewController *contentViewController; 44 | @property (strong, readwrite, nonatomic) UIViewController *leftMenuViewController; 45 | @property (strong, readwrite, nonatomic) UIViewController *rightMenuViewController; 46 | @property (weak, readwrite, nonatomic) id delegate; 47 | 48 | @property (assign, readwrite, nonatomic) NSTimeInterval animationDuration; 49 | @property (strong, readwrite, nonatomic) UIImage *backgroundImage; 50 | @property (assign, readwrite, nonatomic) BOOL panGestureEnabled; 51 | @property (assign, readwrite, nonatomic) BOOL panFromEdge; 52 | @property (assign, readwrite, nonatomic) NSUInteger panMinimumOpenThreshold; 53 | @property (assign, readwrite, nonatomic) IBInspectable BOOL interactivePopGestureRecognizerEnabled; 54 | @property (assign, readwrite, nonatomic) IBInspectable BOOL fadeMenuView; 55 | @property (assign, readwrite, nonatomic) IBInspectable BOOL scaleContentView; 56 | @property (assign, readwrite, nonatomic) IBInspectable BOOL scaleBackgroundImageView; 57 | @property (assign, readwrite, nonatomic) IBInspectable BOOL scaleMenuView; 58 | @property (assign, readwrite, nonatomic) IBInspectable BOOL contentViewShadowEnabled; 59 | @property (strong, readwrite, nonatomic) IBInspectable UIColor *contentViewShadowColor; 60 | @property (assign, readwrite, nonatomic) IBInspectable CGSize contentViewShadowOffset; 61 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewShadowOpacity; 62 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewShadowRadius; 63 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewFadeOutAlpha; 64 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewScaleValue; 65 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewInLandscapeOffsetCenterX; 66 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewInPortraitOffsetCenterX; 67 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat parallaxMenuMinimumRelativeValue; 68 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat parallaxMenuMaximumRelativeValue; 69 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat parallaxContentMinimumRelativeValue; 70 | @property (assign, readwrite, nonatomic) IBInspectable CGFloat parallaxContentMaximumRelativeValue; 71 | @property (assign, readwrite, nonatomic) CGAffineTransform menuViewControllerTransformation; 72 | @property (assign, readwrite, nonatomic) IBInspectable BOOL parallaxEnabled; 73 | @property (assign, readwrite, nonatomic) IBInspectable BOOL bouncesHorizontally; 74 | @property (assign, readwrite, nonatomic) UIStatusBarStyle menuPreferredStatusBarStyle; 75 | @property (assign, readwrite, nonatomic) IBInspectable BOOL menuPrefersStatusBarHidden; 76 | 77 | - (id)initWithContentViewController:(UIViewController *)contentViewController 78 | leftMenuViewController:(UIViewController *)leftMenuViewController 79 | rightMenuViewController:(UIViewController *)rightMenuViewController; 80 | - (void)presentLeftMenuViewController; 81 | - (void)presentRightMenuViewController; 82 | - (void)hideMenuViewController; 83 | - (void)setContentViewController:(UIViewController *)contentViewController animated:(BOOL)animated; 84 | 85 | @end 86 | 87 | @protocol RESideMenuDelegate 88 | 89 | @optional 90 | - (void)sideMenu:(RESideMenu *)sideMenu didRecognizePanGesture:(UIPanGestureRecognizer *)recognizer; 91 | - (void)sideMenu:(RESideMenu *)sideMenu willShowMenuViewController:(UIViewController *)menuViewController; 92 | - (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController; 93 | - (void)sideMenu:(RESideMenu *)sideMenu willHideMenuViewController:(UIViewController *)menuViewController; 94 | - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController; 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /RESideMenu/RESideMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // REFrostedViewController.m 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RESideMenu.h" 27 | #import "UIViewController+RESideMenu.h" 28 | #import "RECommonFunctions.h" 29 | 30 | @interface RESideMenu () 31 | 32 | @property (strong, readwrite, nonatomic) UIImageView *backgroundImageView; 33 | @property (assign, readwrite, nonatomic) BOOL visible; 34 | @property (assign, readwrite, nonatomic) BOOL leftMenuVisible; 35 | @property (assign, readwrite, nonatomic) BOOL rightMenuVisible; 36 | @property (assign, readwrite, nonatomic) CGPoint originalPoint; 37 | @property (strong, readwrite, nonatomic) UIButton *contentButton; 38 | @property (strong, readwrite, nonatomic) UIView *menuViewContainer; 39 | @property (strong, readwrite, nonatomic) UIView *contentViewContainer; 40 | @property (assign, readwrite, nonatomic) BOOL didNotifyDelegate; 41 | 42 | @end 43 | 44 | @implementation RESideMenu 45 | 46 | #pragma mark - 47 | #pragma mark Instance lifecycle 48 | 49 | - (id)init 50 | { 51 | self = [super init]; 52 | if (self) { 53 | [self commonInit]; 54 | } 55 | return self; 56 | } 57 | 58 | - (id)initWithCoder:(NSCoder *)decoder 59 | { 60 | self = [super initWithCoder:decoder]; 61 | if (self) { 62 | [self commonInit]; 63 | } 64 | return self; 65 | } 66 | 67 | #if __IPHONE_8_0 68 | - (void)awakeFromNib 69 | { 70 | if (self.contentViewStoryboardID) { 71 | self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.contentViewStoryboardID]; 72 | } 73 | if (self.leftMenuViewStoryboardID) { 74 | self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.leftMenuViewStoryboardID]; 75 | } 76 | if (self.rightMenuViewStoryboardID) { 77 | self.rightMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.rightMenuViewStoryboardID]; 78 | } 79 | } 80 | #endif 81 | 82 | - (void)commonInit 83 | { 84 | _menuViewContainer = [[UIView alloc] init]; 85 | _contentViewContainer = [[UIView alloc] init]; 86 | 87 | _animationDuration = 0.35f; 88 | _interactivePopGestureRecognizerEnabled = YES; 89 | 90 | _menuViewControllerTransformation = CGAffineTransformMakeScale(1.5f, 1.5f); 91 | 92 | _scaleContentView = YES; 93 | _scaleBackgroundImageView = YES; 94 | _scaleMenuView = YES; 95 | _fadeMenuView = YES; 96 | 97 | _parallaxEnabled = YES; 98 | _parallaxMenuMinimumRelativeValue = -15; 99 | _parallaxMenuMaximumRelativeValue = 15; 100 | _parallaxContentMinimumRelativeValue = -25; 101 | _parallaxContentMaximumRelativeValue = 25; 102 | 103 | _bouncesHorizontally = YES; 104 | 105 | _panGestureEnabled = YES; 106 | _panFromEdge = YES; 107 | _panMinimumOpenThreshold = 60.0; 108 | 109 | _contentViewShadowEnabled = NO; 110 | _contentViewShadowColor = [UIColor blackColor]; 111 | _contentViewShadowOffset = CGSizeZero; 112 | _contentViewShadowOpacity = 0.4f; 113 | _contentViewShadowRadius = 8.0f; 114 | _contentViewFadeOutAlpha = 1.0f; 115 | _contentViewInLandscapeOffsetCenterX = 30.f; 116 | _contentViewInPortraitOffsetCenterX = 30.f; 117 | _contentViewScaleValue = 0.7f; 118 | } 119 | 120 | #pragma mark - 121 | #pragma mark Public methods 122 | 123 | - (id)initWithContentViewController:(UIViewController *)contentViewController leftMenuViewController:(UIViewController *)leftMenuViewController rightMenuViewController:(UIViewController *)rightMenuViewController 124 | { 125 | self = [self init]; 126 | if (self) { 127 | _contentViewController = contentViewController; 128 | _leftMenuViewController = leftMenuViewController; 129 | _rightMenuViewController = rightMenuViewController; 130 | } 131 | return self; 132 | } 133 | 134 | - (void)presentLeftMenuViewController 135 | { 136 | [self presentMenuViewContainerWithMenuViewController:self.leftMenuViewController]; 137 | [self showLeftMenuViewController]; 138 | } 139 | 140 | - (void)presentRightMenuViewController 141 | { 142 | [self presentMenuViewContainerWithMenuViewController:self.rightMenuViewController]; 143 | [self showRightMenuViewController]; 144 | } 145 | 146 | - (void)hideMenuViewController 147 | { 148 | [self hideMenuViewControllerAnimated:YES]; 149 | } 150 | 151 | - (void)setContentViewController:(UIViewController *)contentViewController animated:(BOOL)animated 152 | { 153 | if (_contentViewController == contentViewController) 154 | { 155 | return; 156 | } 157 | 158 | if (!animated) { 159 | [self setContentViewController:contentViewController]; 160 | } else { 161 | [self addChildViewController:contentViewController]; 162 | contentViewController.view.alpha = 0; 163 | contentViewController.view.frame = self.contentViewContainer.bounds; 164 | [self.contentViewContainer addSubview:contentViewController.view]; 165 | [UIView animateWithDuration:self.animationDuration animations:^{ 166 | contentViewController.view.alpha = 1; 167 | } completion:^(BOOL finished) { 168 | [self hideViewController:self.contentViewController]; 169 | [contentViewController didMoveToParentViewController:self]; 170 | _contentViewController = contentViewController; 171 | 172 | [self statusBarNeedsAppearanceUpdate]; 173 | [self updateContentViewShadow]; 174 | 175 | if (self.visible) { 176 | [self addContentViewControllerMotionEffects]; 177 | } 178 | }]; 179 | } 180 | } 181 | 182 | #pragma mark View life cycle 183 | 184 | - (void)viewDidLoad 185 | { 186 | [super viewDidLoad]; 187 | 188 | self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 189 | self.backgroundImageView = ({ 190 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; 191 | imageView.image = self.backgroundImage; 192 | imageView.contentMode = UIViewContentModeScaleAspectFill; 193 | imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 194 | imageView; 195 | }); 196 | self.contentButton = ({ 197 | UIButton *button = [[UIButton alloc] initWithFrame:CGRectNull]; 198 | [button addTarget:self action:@selector(hideMenuViewController) forControlEvents:UIControlEventTouchUpInside]; 199 | button; 200 | }); 201 | 202 | [self.view addSubview:self.backgroundImageView]; 203 | [self.view addSubview:self.menuViewContainer]; 204 | [self.view addSubview:self.contentViewContainer]; 205 | 206 | self.menuViewContainer.frame = self.view.bounds; 207 | self.menuViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 208 | 209 | if (self.leftMenuViewController) { 210 | [self addChildViewController:self.leftMenuViewController]; 211 | self.leftMenuViewController.view.frame = self.view.bounds; 212 | self.leftMenuViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 213 | [self.menuViewContainer addSubview:self.leftMenuViewController.view]; 214 | [self.leftMenuViewController didMoveToParentViewController:self]; 215 | } 216 | 217 | if (self.rightMenuViewController) { 218 | [self addChildViewController:self.rightMenuViewController]; 219 | self.rightMenuViewController.view.frame = self.view.bounds; 220 | self.rightMenuViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 221 | [self.menuViewContainer addSubview:self.rightMenuViewController.view]; 222 | [self.rightMenuViewController didMoveToParentViewController:self]; 223 | } 224 | 225 | self.contentViewContainer.frame = self.view.bounds; 226 | self.contentViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 227 | 228 | [self addChildViewController:self.contentViewController]; 229 | self.contentViewController.view.frame = self.view.bounds; 230 | [self.contentViewContainer addSubview:self.contentViewController.view]; 231 | [self.contentViewController didMoveToParentViewController:self]; 232 | 233 | self.menuViewContainer.alpha = !self.fadeMenuView ?: 0; 234 | if (self.scaleBackgroundImageView) 235 | self.backgroundImageView.transform = CGAffineTransformMakeScale(1.7f, 1.7f); 236 | 237 | [self addMenuViewControllerMotionEffects]; 238 | 239 | if (self.panGestureEnabled) { 240 | self.view.multipleTouchEnabled = NO; 241 | UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)]; 242 | panGestureRecognizer.delegate = self; 243 | [self.view addGestureRecognizer:panGestureRecognizer]; 244 | } 245 | 246 | [self updateContentViewShadow]; 247 | } 248 | 249 | #pragma mark - 250 | #pragma mark Private methods 251 | 252 | - (void)presentMenuViewContainerWithMenuViewController:(UIViewController *)menuViewController 253 | { 254 | self.menuViewContainer.transform = CGAffineTransformIdentity; 255 | if (self.scaleBackgroundImageView) { 256 | self.backgroundImageView.transform = CGAffineTransformIdentity; 257 | self.backgroundImageView.frame = self.view.bounds; 258 | } 259 | self.menuViewContainer.frame = self.view.bounds; 260 | if (self.scaleMenuView) { 261 | self.menuViewContainer.transform = self.menuViewControllerTransformation; 262 | } 263 | self.menuViewContainer.alpha = !self.fadeMenuView ?: 0; 264 | if (self.scaleBackgroundImageView) 265 | self.backgroundImageView.transform = CGAffineTransformMakeScale(1.7f, 1.7f); 266 | 267 | if ([self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:willShowMenuViewController:)]) { 268 | [self.delegate sideMenu:self willShowMenuViewController:menuViewController]; 269 | } 270 | } 271 | 272 | - (void)showLeftMenuViewController 273 | { 274 | if (!self.leftMenuViewController) { 275 | return; 276 | } 277 | [self.leftMenuViewController beginAppearanceTransition:YES animated:YES]; 278 | self.leftMenuViewController.view.hidden = NO; 279 | self.rightMenuViewController.view.hidden = YES; 280 | [self.view.window endEditing:YES]; 281 | [self addContentButton]; 282 | [self updateContentViewShadow]; 283 | [self resetContentViewScale]; 284 | 285 | [UIView animateWithDuration:self.animationDuration animations:^{ 286 | if (self.scaleContentView) { 287 | self.contentViewContainer.transform = CGAffineTransformMakeScale(self.contentViewScaleValue, self.contentViewScaleValue); 288 | } else { 289 | self.contentViewContainer.transform = CGAffineTransformIdentity; 290 | } 291 | 292 | if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) { 293 | self.contentViewContainer.center = CGPointMake((UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]) ? self.contentViewInLandscapeOffsetCenterX + CGRectGetWidth(self.view.frame) : self.contentViewInPortraitOffsetCenterX + CGRectGetWidth(self.view.frame)), self.contentViewContainer.center.y); 294 | } else { 295 | self.contentViewContainer.center = CGPointMake((UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]) ? self.contentViewInLandscapeOffsetCenterX + CGRectGetHeight(self.view.frame) : self.contentViewInPortraitOffsetCenterX + CGRectGetWidth(self.view.frame)), self.contentViewContainer.center.y); 296 | } 297 | 298 | self.menuViewContainer.alpha = !self.fadeMenuView ?: 1.0f; 299 | self.contentViewContainer.alpha = self.contentViewFadeOutAlpha; 300 | self.menuViewContainer.transform = CGAffineTransformIdentity; 301 | if (self.scaleBackgroundImageView) 302 | self.backgroundImageView.transform = CGAffineTransformIdentity; 303 | 304 | } completion:^(BOOL finished) { 305 | [self addContentViewControllerMotionEffects]; 306 | [self.leftMenuViewController endAppearanceTransition]; 307 | 308 | if (!self.visible && [self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:didShowMenuViewController:)]) { 309 | [self.delegate sideMenu:self didShowMenuViewController:self.leftMenuViewController]; 310 | } 311 | 312 | self.visible = YES; 313 | self.leftMenuVisible = YES; 314 | }]; 315 | 316 | [self statusBarNeedsAppearanceUpdate]; 317 | } 318 | 319 | - (void)showRightMenuViewController 320 | { 321 | if (!self.rightMenuViewController) { 322 | return; 323 | } 324 | [self.rightMenuViewController beginAppearanceTransition:YES animated:YES]; 325 | self.leftMenuViewController.view.hidden = YES; 326 | self.rightMenuViewController.view.hidden = NO; 327 | [self.view.window endEditing:YES]; 328 | [self addContentButton]; 329 | [self updateContentViewShadow]; 330 | [self resetContentViewScale]; 331 | 332 | [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; 333 | [UIView animateWithDuration:self.animationDuration animations:^{ 334 | if (self.scaleContentView) { 335 | self.contentViewContainer.transform = CGAffineTransformMakeScale(self.contentViewScaleValue, self.contentViewScaleValue); 336 | } else { 337 | self.contentViewContainer.transform = CGAffineTransformIdentity; 338 | } 339 | self.contentViewContainer.center = CGPointMake((UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]) ? -self.contentViewInLandscapeOffsetCenterX : -self.contentViewInPortraitOffsetCenterX), self.contentViewContainer.center.y); 340 | 341 | self.menuViewContainer.alpha = !self.fadeMenuView ?: 1.0f; 342 | self.contentViewContainer.alpha = self.contentViewFadeOutAlpha; 343 | self.menuViewContainer.transform = CGAffineTransformIdentity; 344 | if (self.scaleBackgroundImageView) 345 | self.backgroundImageView.transform = CGAffineTransformIdentity; 346 | 347 | } completion:^(BOOL finished) { 348 | [self.rightMenuViewController endAppearanceTransition]; 349 | if (!self.rightMenuVisible && [self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:didShowMenuViewController:)]) { 350 | [self.delegate sideMenu:self didShowMenuViewController:self.rightMenuViewController]; 351 | } 352 | 353 | self.visible = !(self.contentViewContainer.frame.size.width == self.view.bounds.size.width && self.contentViewContainer.frame.size.height == self.view.bounds.size.height && self.contentViewContainer.frame.origin.x == 0 && self.contentViewContainer.frame.origin.y == 0); 354 | self.rightMenuVisible = self.visible; 355 | [[UIApplication sharedApplication] endIgnoringInteractionEvents]; 356 | [self addContentViewControllerMotionEffects]; 357 | }]; 358 | 359 | [self statusBarNeedsAppearanceUpdate]; 360 | } 361 | 362 | - (void)hideViewController:(UIViewController *)viewController 363 | { 364 | [viewController willMoveToParentViewController:nil]; 365 | [viewController.view removeFromSuperview]; 366 | [viewController removeFromParentViewController]; 367 | } 368 | 369 | - (void)hideMenuViewControllerAnimated:(BOOL)animated 370 | { 371 | BOOL rightMenuVisible = self.rightMenuVisible; 372 | UIViewController *visibleMenuViewController = rightMenuVisible ? self.rightMenuViewController : self.leftMenuViewController; 373 | [visibleMenuViewController beginAppearanceTransition:NO animated:animated]; 374 | if ([self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:willHideMenuViewController:)]) { 375 | [self.delegate sideMenu:self willHideMenuViewController:rightMenuVisible ? self.rightMenuViewController : self.leftMenuViewController]; 376 | } 377 | 378 | self.visible = NO; 379 | self.leftMenuVisible = NO; 380 | self.rightMenuVisible = NO; 381 | [self.contentButton removeFromSuperview]; 382 | 383 | __typeof (self) __weak weakSelf = self; 384 | void (^animationBlock)(void) = ^{ 385 | __typeof (weakSelf) __strong strongSelf = weakSelf; 386 | if (!strongSelf) { 387 | return; 388 | } 389 | strongSelf.contentViewContainer.transform = CGAffineTransformIdentity; 390 | strongSelf.contentViewContainer.frame = strongSelf.view.bounds; 391 | if (strongSelf.scaleMenuView) { 392 | strongSelf.menuViewContainer.transform = strongSelf.menuViewControllerTransformation; 393 | } 394 | strongSelf.menuViewContainer.alpha = !self.fadeMenuView ?: 0; 395 | strongSelf.contentViewContainer.alpha = 1; 396 | 397 | if (strongSelf.scaleBackgroundImageView) { 398 | strongSelf.backgroundImageView.transform = CGAffineTransformMakeScale(1.7f, 1.7f); 399 | } 400 | if (strongSelf.parallaxEnabled) { 401 | IF_IOS7_OR_GREATER( 402 | for (UIMotionEffect *effect in strongSelf.contentViewContainer.motionEffects) { 403 | [strongSelf.contentViewContainer removeMotionEffect:effect]; 404 | } 405 | ); 406 | } 407 | }; 408 | void (^completionBlock)(void) = ^{ 409 | __typeof (weakSelf) __strong strongSelf = weakSelf; 410 | if (!strongSelf) { 411 | return; 412 | } 413 | [visibleMenuViewController endAppearanceTransition]; 414 | if (!strongSelf.visible && [strongSelf.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [strongSelf.delegate respondsToSelector:@selector(sideMenu:didHideMenuViewController:)]) { 415 | [strongSelf.delegate sideMenu:strongSelf didHideMenuViewController:rightMenuVisible ? strongSelf.rightMenuViewController : strongSelf.leftMenuViewController]; 416 | } 417 | }; 418 | 419 | if (animated) { 420 | [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; 421 | [UIView animateWithDuration:self.animationDuration animations:^{ 422 | animationBlock(); 423 | } completion:^(BOOL finished) { 424 | [[UIApplication sharedApplication] endIgnoringInteractionEvents]; 425 | completionBlock(); 426 | }]; 427 | } else { 428 | animationBlock(); 429 | completionBlock(); 430 | } 431 | [self statusBarNeedsAppearanceUpdate]; 432 | } 433 | 434 | - (void)addContentButton 435 | { 436 | if (self.contentButton.superview) 437 | return; 438 | 439 | self.contentButton.autoresizingMask = UIViewAutoresizingNone; 440 | self.contentButton.frame = self.contentViewContainer.bounds; 441 | self.contentButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 442 | [self.contentViewContainer addSubview:self.contentButton]; 443 | } 444 | 445 | - (void)statusBarNeedsAppearanceUpdate 446 | { 447 | if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { 448 | [UIView animateWithDuration:0.3f animations:^{ 449 | [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; 450 | }]; 451 | } 452 | } 453 | 454 | - (void)updateContentViewShadow 455 | { 456 | if (self.contentViewShadowEnabled) { 457 | CALayer *layer = self.contentViewContainer.layer; 458 | UIBezierPath *path = [UIBezierPath bezierPathWithRect:layer.bounds]; 459 | layer.shadowPath = path.CGPath; 460 | layer.shadowColor = self.contentViewShadowColor.CGColor; 461 | layer.shadowOffset = self.contentViewShadowOffset; 462 | layer.shadowOpacity = self.contentViewShadowOpacity; 463 | layer.shadowRadius = self.contentViewShadowRadius; 464 | } 465 | } 466 | 467 | - (void)resetContentViewScale 468 | { 469 | CGAffineTransform t = self.contentViewContainer.transform; 470 | CGFloat scale = sqrt(t.a * t.a + t.c * t.c); 471 | CGRect frame = self.contentViewContainer.frame; 472 | self.contentViewContainer.transform = CGAffineTransformIdentity; 473 | self.contentViewContainer.transform = CGAffineTransformMakeScale(scale, scale); 474 | self.contentViewContainer.frame = frame; 475 | } 476 | 477 | #pragma mark - 478 | #pragma mark iOS 7 Motion Effects (Private) 479 | 480 | - (void)addMenuViewControllerMotionEffects 481 | { 482 | if (self.parallaxEnabled) { 483 | IF_IOS7_OR_GREATER( 484 | for (UIMotionEffect *effect in self.menuViewContainer.motionEffects) { 485 | [self.menuViewContainer removeMotionEffect:effect]; 486 | } 487 | UIInterpolatingMotionEffect *interpolationHorizontal = [[UIInterpolatingMotionEffect alloc]initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; 488 | interpolationHorizontal.minimumRelativeValue = @(self.parallaxMenuMinimumRelativeValue); 489 | interpolationHorizontal.maximumRelativeValue = @(self.parallaxMenuMaximumRelativeValue); 490 | 491 | UIInterpolatingMotionEffect *interpolationVertical = [[UIInterpolatingMotionEffect alloc]initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; 492 | interpolationVertical.minimumRelativeValue = @(self.parallaxMenuMinimumRelativeValue); 493 | interpolationVertical.maximumRelativeValue = @(self.parallaxMenuMaximumRelativeValue); 494 | 495 | [self.menuViewContainer addMotionEffect:interpolationHorizontal]; 496 | [self.menuViewContainer addMotionEffect:interpolationVertical]; 497 | ); 498 | } 499 | } 500 | 501 | - (void)addContentViewControllerMotionEffects 502 | { 503 | if (self.parallaxEnabled) { 504 | IF_IOS7_OR_GREATER( 505 | for (UIMotionEffect *effect in self.contentViewContainer.motionEffects) { 506 | [self.contentViewContainer removeMotionEffect:effect]; 507 | } 508 | [UIView animateWithDuration:0.2 animations:^{ 509 | UIInterpolatingMotionEffect *interpolationHorizontal = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; 510 | interpolationHorizontal.minimumRelativeValue = @(self.parallaxContentMinimumRelativeValue); 511 | interpolationHorizontal.maximumRelativeValue = @(self.parallaxContentMaximumRelativeValue); 512 | 513 | UIInterpolatingMotionEffect *interpolationVertical = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; 514 | interpolationVertical.minimumRelativeValue = @(self.parallaxContentMinimumRelativeValue); 515 | interpolationVertical.maximumRelativeValue = @(self.parallaxContentMaximumRelativeValue); 516 | 517 | [self.contentViewContainer addMotionEffect:interpolationHorizontal]; 518 | [self.contentViewContainer addMotionEffect:interpolationVertical]; 519 | }]; 520 | ); 521 | } 522 | } 523 | 524 | #pragma mark - 525 | #pragma mark UIGestureRecognizer Delegate (Private) 526 | 527 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch 528 | { 529 | IF_IOS7_OR_GREATER( 530 | if (self.interactivePopGestureRecognizerEnabled && [self.contentViewController isKindOfClass:[UINavigationController class]]) { 531 | UINavigationController *navigationController = (UINavigationController *)self.contentViewController; 532 | if (navigationController.viewControllers.count > 1 && navigationController.interactivePopGestureRecognizer.enabled) { 533 | return NO; 534 | } 535 | } 536 | ); 537 | 538 | if (self.panFromEdge && [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && !self.visible) { 539 | CGPoint point = [touch locationInView:gestureRecognizer.view]; 540 | if (point.x < 20.0 || point.x > self.view.frame.size.width - 20.0) { 541 | return YES; 542 | } else { 543 | return NO; 544 | } 545 | } 546 | 547 | return YES; 548 | } 549 | 550 | #pragma mark - 551 | #pragma mark Pan gesture recognizer (Private) 552 | 553 | - (void)panGestureRecognized:(UIPanGestureRecognizer *)recognizer 554 | { 555 | if ([self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:didRecognizePanGesture:)]) 556 | [self.delegate sideMenu:self didRecognizePanGesture:recognizer]; 557 | 558 | if (!self.panGestureEnabled) { 559 | return; 560 | } 561 | 562 | CGPoint point = [recognizer translationInView:self.view]; 563 | 564 | if (recognizer.state == UIGestureRecognizerStateBegan) { 565 | [self updateContentViewShadow]; 566 | 567 | self.originalPoint = CGPointMake(self.contentViewContainer.center.x - CGRectGetWidth(self.contentViewContainer.bounds) / 2.0, 568 | self.contentViewContainer.center.y - CGRectGetHeight(self.contentViewContainer.bounds) / 2.0); 569 | self.menuViewContainer.transform = CGAffineTransformIdentity; 570 | if (self.scaleBackgroundImageView) { 571 | self.backgroundImageView.transform = CGAffineTransformIdentity; 572 | self.backgroundImageView.frame = self.view.bounds; 573 | } 574 | self.menuViewContainer.frame = self.view.bounds; 575 | [self addContentButton]; 576 | [self.view.window endEditing:YES]; 577 | self.didNotifyDelegate = NO; 578 | } 579 | 580 | if (recognizer.state == UIGestureRecognizerStateChanged) { 581 | CGFloat delta = 0; 582 | if (self.visible) { 583 | delta = self.originalPoint.x != 0 ? (point.x + self.originalPoint.x) / self.originalPoint.x : 0; 584 | } else { 585 | delta = point.x / self.view.frame.size.width; 586 | } 587 | delta = MIN(fabs(delta), 1.6); 588 | 589 | CGFloat contentViewScale = self.scaleContentView ? 1 - ((1 - self.contentViewScaleValue) * delta) : 1; 590 | 591 | CGFloat backgroundViewScale = 1.7f - (0.7f * delta); 592 | CGFloat menuViewScale = 1.5f - (0.5f * delta); 593 | 594 | if (!self.bouncesHorizontally) { 595 | contentViewScale = MAX(contentViewScale, self.contentViewScaleValue); 596 | backgroundViewScale = MAX(backgroundViewScale, 1.0); 597 | menuViewScale = MAX(menuViewScale, 1.0); 598 | } 599 | 600 | self.menuViewContainer.alpha = !self.fadeMenuView ?: delta; 601 | self.contentViewContainer.alpha = 1 - (1 - self.contentViewFadeOutAlpha) * delta; 602 | 603 | if (self.scaleBackgroundImageView) { 604 | self.backgroundImageView.transform = CGAffineTransformMakeScale(backgroundViewScale, backgroundViewScale); 605 | } 606 | 607 | if (self.scaleMenuView) { 608 | self.menuViewContainer.transform = CGAffineTransformMakeScale(menuViewScale, menuViewScale); 609 | } 610 | 611 | if (self.scaleBackgroundImageView) { 612 | if (backgroundViewScale < 1) { 613 | self.backgroundImageView.transform = CGAffineTransformIdentity; 614 | } 615 | } 616 | 617 | if (!self.bouncesHorizontally && self.visible) { 618 | if (self.contentViewContainer.frame.origin.x > self.contentViewContainer.frame.size.width / 2.0) 619 | point.x = MIN(0.0, point.x); 620 | 621 | if (self.contentViewContainer.frame.origin.x < -(self.contentViewContainer.frame.size.width / 2.0)) 622 | point.x = MAX(0.0, point.x); 623 | } 624 | 625 | // Limit size 626 | // 627 | if (point.x < 0) { 628 | point.x = MAX(point.x, -[UIScreen mainScreen].bounds.size.height); 629 | } else { 630 | point.x = MIN(point.x, [UIScreen mainScreen].bounds.size.height); 631 | } 632 | [recognizer setTranslation:point inView:self.view]; 633 | 634 | if (!self.didNotifyDelegate) { 635 | if (point.x > 0) { 636 | if (!self.visible && [self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:willShowMenuViewController:)]) { 637 | [self.delegate sideMenu:self willShowMenuViewController:self.leftMenuViewController]; 638 | } 639 | } 640 | if (point.x < 0) { 641 | if (!self.visible && [self.delegate conformsToProtocol:@protocol(RESideMenuDelegate)] && [self.delegate respondsToSelector:@selector(sideMenu:willShowMenuViewController:)]) { 642 | [self.delegate sideMenu:self willShowMenuViewController:self.rightMenuViewController]; 643 | } 644 | } 645 | self.didNotifyDelegate = YES; 646 | } 647 | 648 | if (contentViewScale > 1) { 649 | CGFloat oppositeScale = (1 - (contentViewScale - 1)); 650 | self.contentViewContainer.transform = CGAffineTransformMakeScale(oppositeScale, oppositeScale); 651 | self.contentViewContainer.transform = CGAffineTransformTranslate(self.contentViewContainer.transform, point.x, 0); 652 | } else { 653 | self.contentViewContainer.transform = CGAffineTransformMakeScale(contentViewScale, contentViewScale); 654 | self.contentViewContainer.transform = CGAffineTransformTranslate(self.contentViewContainer.transform, point.x, 0); 655 | } 656 | 657 | self.leftMenuViewController.view.hidden = self.contentViewContainer.frame.origin.x < 0; 658 | self.rightMenuViewController.view.hidden = self.contentViewContainer.frame.origin.x > 0; 659 | 660 | if (!self.leftMenuViewController && self.contentViewContainer.frame.origin.x > 0) { 661 | self.contentViewContainer.transform = CGAffineTransformIdentity; 662 | self.contentViewContainer.frame = self.view.bounds; 663 | self.visible = NO; 664 | self.leftMenuVisible = NO; 665 | } else if (!self.rightMenuViewController && self.contentViewContainer.frame.origin.x < 0) { 666 | self.contentViewContainer.transform = CGAffineTransformIdentity; 667 | self.contentViewContainer.frame = self.view.bounds; 668 | self.visible = NO; 669 | self.rightMenuVisible = NO; 670 | } 671 | 672 | [self statusBarNeedsAppearanceUpdate]; 673 | } 674 | 675 | if (recognizer.state == UIGestureRecognizerStateEnded) { 676 | self.didNotifyDelegate = NO; 677 | if (self.panMinimumOpenThreshold > 0 && ( 678 | (self.contentViewContainer.frame.origin.x < 0 && self.contentViewContainer.frame.origin.x > -((NSInteger)self.panMinimumOpenThreshold)) || 679 | (self.contentViewContainer.frame.origin.x > 0 && self.contentViewContainer.frame.origin.x < self.panMinimumOpenThreshold)) 680 | ) { 681 | [self hideMenuViewController]; 682 | } 683 | else if (self.contentViewContainer.frame.origin.x == 0) { 684 | [self hideMenuViewControllerAnimated:NO]; 685 | } 686 | else { 687 | if ([recognizer velocityInView:self.view].x > 0) { 688 | if (self.contentViewContainer.frame.origin.x < 0) { 689 | [self hideMenuViewController]; 690 | } else { 691 | if (self.leftMenuViewController) { 692 | [self showLeftMenuViewController]; 693 | } 694 | } 695 | } else { 696 | if (self.contentViewContainer.frame.origin.x < 20) { 697 | if (self.rightMenuViewController) { 698 | [self showRightMenuViewController]; 699 | } 700 | } else { 701 | [self hideMenuViewController]; 702 | } 703 | } 704 | } 705 | } 706 | } 707 | 708 | #pragma mark - 709 | #pragma mark Setters 710 | 711 | - (void)setBackgroundImage:(UIImage *)backgroundImage 712 | { 713 | _backgroundImage = backgroundImage; 714 | if (self.backgroundImageView) 715 | self.backgroundImageView.image = backgroundImage; 716 | } 717 | 718 | - (void)setContentViewController:(UIViewController *)contentViewController 719 | { 720 | if (!_contentViewController) { 721 | _contentViewController = contentViewController; 722 | return; 723 | } 724 | [self hideViewController:_contentViewController]; 725 | _contentViewController = contentViewController; 726 | 727 | [self addChildViewController:self.contentViewController]; 728 | self.contentViewController.view.frame = self.view.bounds; 729 | [self.contentViewContainer addSubview:self.contentViewController.view]; 730 | [self.contentViewController didMoveToParentViewController:self]; 731 | 732 | [self updateContentViewShadow]; 733 | 734 | if (self.visible) { 735 | [self addContentViewControllerMotionEffects]; 736 | } 737 | } 738 | 739 | - (void)setLeftMenuViewController:(UIViewController *)leftMenuViewController 740 | { 741 | if (!_leftMenuViewController) { 742 | _leftMenuViewController = leftMenuViewController; 743 | return; 744 | } 745 | [self hideViewController:_leftMenuViewController]; 746 | _leftMenuViewController = leftMenuViewController; 747 | 748 | [self addChildViewController:self.leftMenuViewController]; 749 | self.leftMenuViewController.view.frame = self.view.bounds; 750 | self.leftMenuViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 751 | [self.menuViewContainer addSubview:self.leftMenuViewController.view]; 752 | [self.leftMenuViewController didMoveToParentViewController:self]; 753 | 754 | [self addMenuViewControllerMotionEffects]; 755 | [self.view bringSubviewToFront:self.contentViewContainer]; 756 | } 757 | 758 | - (void)setRightMenuViewController:(UIViewController *)rightMenuViewController 759 | { 760 | if (!_rightMenuViewController) { 761 | _rightMenuViewController = rightMenuViewController; 762 | return; 763 | } 764 | [self hideViewController:_rightMenuViewController]; 765 | _rightMenuViewController = rightMenuViewController; 766 | 767 | [self addChildViewController:self.rightMenuViewController]; 768 | self.rightMenuViewController.view.frame = self.view.bounds; 769 | self.rightMenuViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 770 | [self.menuViewContainer addSubview:self.rightMenuViewController.view]; 771 | [self.rightMenuViewController didMoveToParentViewController:self]; 772 | 773 | [self addMenuViewControllerMotionEffects]; 774 | [self.view bringSubviewToFront:self.contentViewContainer]; 775 | } 776 | 777 | #pragma mark - 778 | #pragma mark View Controller Rotation handler 779 | 780 | - (BOOL)shouldAutorotate 781 | { 782 | return self.contentViewController.shouldAutorotate; 783 | } 784 | 785 | - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 786 | { 787 | if (self.visible) { 788 | self.menuViewContainer.bounds = self.view.bounds; 789 | self.contentViewContainer.transform = CGAffineTransformIdentity; 790 | self.contentViewContainer.frame = self.view.bounds; 791 | 792 | if (self.scaleContentView) { 793 | self.contentViewContainer.transform = CGAffineTransformMakeScale(self.contentViewScaleValue, self.contentViewScaleValue); 794 | } else { 795 | self.contentViewContainer.transform = CGAffineTransformIdentity; 796 | } 797 | 798 | CGPoint center; 799 | if (self.leftMenuVisible) { 800 | if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) { 801 | center = CGPointMake((UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) ? self.contentViewInLandscapeOffsetCenterX + CGRectGetWidth(self.view.frame) : self.contentViewInPortraitOffsetCenterX + CGRectGetWidth(self.view.frame)), self.contentViewContainer.center.y); 802 | } else { 803 | center = CGPointMake((UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) ? self.contentViewInLandscapeOffsetCenterX + CGRectGetHeight(self.view.frame) : self.contentViewInPortraitOffsetCenterX + CGRectGetWidth(self.view.frame)), self.contentViewContainer.center.y); 804 | } 805 | } else { 806 | center = CGPointMake((UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) ? -self.contentViewInLandscapeOffsetCenterX : -self.contentViewInPortraitOffsetCenterX), self.contentViewContainer.center.y); 807 | } 808 | 809 | self.contentViewContainer.center = center; 810 | } 811 | 812 | [self updateContentViewShadow]; 813 | } 814 | 815 | #pragma mark - 816 | #pragma mark Status Bar Appearance Management 817 | 818 | - (UIStatusBarStyle)preferredStatusBarStyle 819 | { 820 | UIStatusBarStyle statusBarStyle = UIStatusBarStyleDefault; 821 | IF_IOS7_OR_GREATER( 822 | statusBarStyle = self.visible ? self.menuPreferredStatusBarStyle : self.contentViewController.preferredStatusBarStyle; 823 | if (self.contentViewContainer.frame.origin.y > 10) { 824 | statusBarStyle = self.menuPreferredStatusBarStyle; 825 | } else { 826 | statusBarStyle = self.contentViewController.preferredStatusBarStyle; 827 | } 828 | ); 829 | return statusBarStyle; 830 | } 831 | 832 | - (BOOL)prefersStatusBarHidden 833 | { 834 | BOOL statusBarHidden = NO; 835 | IF_IOS7_OR_GREATER( 836 | statusBarHidden = self.visible ? self.menuPrefersStatusBarHidden : self.contentViewController.prefersStatusBarHidden; 837 | if (self.contentViewContainer.frame.origin.y > 10) { 838 | statusBarHidden = self.menuPrefersStatusBarHidden; 839 | } else { 840 | statusBarHidden = self.contentViewController.prefersStatusBarHidden; 841 | } 842 | ); 843 | return statusBarHidden; 844 | } 845 | 846 | - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation 847 | { 848 | UIStatusBarAnimation statusBarAnimation = UIStatusBarAnimationNone; 849 | IF_IOS7_OR_GREATER( 850 | statusBarAnimation = self.visible ? self.leftMenuViewController.preferredStatusBarUpdateAnimation : self.contentViewController.preferredStatusBarUpdateAnimation; 851 | if (self.contentViewContainer.frame.origin.y > 10) { 852 | statusBarAnimation = self.leftMenuViewController.preferredStatusBarUpdateAnimation; 853 | } else { 854 | statusBarAnimation = self.contentViewController.preferredStatusBarUpdateAnimation; 855 | } 856 | ); 857 | return statusBarAnimation; 858 | } 859 | 860 | @end 861 | -------------------------------------------------------------------------------- /RESideMenu/UIViewController+RESideMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+RESideMenu.h 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @class RESideMenu; 29 | 30 | @interface UIViewController (RESideMenu) 31 | 32 | @property (strong, readonly, nonatomic) RESideMenu *sideMenuViewController; 33 | 34 | // IB Action Helper methods 35 | 36 | - (IBAction)presentLeftMenuViewController:(id)sender; 37 | - (IBAction)presentRightMenuViewController:(id)sender; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /RESideMenu/UIViewController+RESideMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+RESideMenu.m 3 | // RESideMenu 4 | // 5 | // Copyright (c) 2013-2014 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "UIViewController+RESideMenu.h" 27 | #import "RESideMenu.h" 28 | 29 | @implementation UIViewController (RESideMenu) 30 | 31 | - (RESideMenu *)sideMenuViewController 32 | { 33 | UIViewController *iter = self.parentViewController; 34 | while (iter) { 35 | if ([iter isKindOfClass:[RESideMenu class]]) { 36 | return (RESideMenu *)iter; 37 | } else if (iter.parentViewController && iter.parentViewController != iter) { 38 | iter = iter.parentViewController; 39 | } else { 40 | iter = nil; 41 | } 42 | } 43 | return nil; 44 | } 45 | 46 | #pragma mark - 47 | #pragma mark IB Action Helper methods 48 | 49 | - (IBAction)presentLeftMenuViewController:(id)sender 50 | { 51 | [self.sideMenuViewController presentLeftMenuViewController]; 52 | } 53 | 54 | - (IBAction)presentRightMenuViewController:(id)sender 55 | { 56 | [self.sideMenuViewController presentRightMenuViewController]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RESideMenu/44a22b42372058440ca9797adba8d3a844582b4c/Screenshot.png --------------------------------------------------------------------------------