RESideMenu Deployment & Usage Guide
A comprehensive guide for integrating the RESideMenu iOS side menu library into your project.
1. Prerequisites
Before you begin, ensure you have the following installed:
- macOS with latest updates
- Xcode 6.0 or higher (from Mac App Store or Apple Developer)
- iOS SDK matching your target deployment version (iOS 6.0+)
- Git (for cloning repository or CocoaPods)
- CocoaPods (recommended, version >= 0.28.0) - optional but recommended
- Command Line Tools for Xcode (
xcode-select --install)
Verify installations:
xcodebuild -version
git --version
pod --version # if using CocoaPods
2. Installation
Choose one of the following installation methods.
Method A: CocoaPods (Recommended)
-
Navigate to your Xcode project directory:
cd /path/to/YourProject -
Create or edit your
Podfile:touch Podfile open -e Podfile # or use any text editor -
Add the RESideMenu pod specification:
platform :ios, '6.0' pod 'RESideMenu', '~> 4.0.7' -
Install the pod:
pod install -
Important: From this point forward, open your project using the
.xcworkspacefile:open YourProject.xcworkspace
Method B: Manual Installation
-
Clone or download the repository:
git clone https://github.com/romaonthego/RESideMenu.git -
Drag the
RESideMenufolder from the cloned repository into your Xcode project's file navigator. -
Ensure the following files are added to your target's "Compile Sources" build phase:
RESideMenu.hRESideMenu.m- All other
.mfiles in theRESideMenufolder
-
In any class that uses RESideMenu, add the import:
#import "RESideMenu.h"
3. Configuration
RESideMenu requires configuration in your app's root view controller setup.
Programmatic Setup (AppDelegate)
In your AppDelegate.m application:didFinishLaunchingWithOptions: method:
// 1. Create your content view controller (typically embedded in a navigation controller)
UIViewController *contentVC = [[YourContentViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:contentVC];
// 2. Create left and/or right menu view controllers
UIViewController *leftMenuVC = [[YourLeftMenuViewController alloc] init];
UIViewController *rightMenuVC = [[YourRightMenuViewController alloc] init]; // Optional
// 3. Initialize RESideMenu
RESideMenu *sideMenuVC = [[RESideMenu alloc] initWithContentViewController:navigationController
leftMenuViewController:leftMenuVC
rightMenuViewController:rightMenuVC];
// 4. Optional customization
sideMenuVC.backgroundImage = [UIImage imageNamed:@"your_background"]; // Parallax background
sideMenuVC.animationDuration = 0.3; // Default is 0.3
// 5. Set as root view controller
self.window.rootViewController = sideMenuVC;
[self.window makeKeyAndVisible];
Storyboard Integration
- Create a subclass of
RESideMenu(e.g.,DEMORootViewController). - In your Main.storyboard:
- Set the initial view controller's class to your subclass.
- Set the view controller's Storyboard ID to
contentViewController. - Add two additional view controllers and set their Storyboard IDs to
leftMenuViewControllerandrightMenuViewController.
- In your subclass implementation (
DEMORootViewController.m):- (void)awakeFromNib { self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"]; self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"leftMenuViewController"]; self.rightMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"rightMenuViewController"]; }
4. Build & Run
Running the Demo Projects
-
Open either example project:
RESideMenuExample/RESideMenuExample.xcodeproj(programmatic setup)RESideMenuStoryboardsExample/RESideMenuStoryboardsExample.xcodeproj(storyboard setup)
-
Select a simulator (iOS 6.0+).
-
Press Cmd+R to build and run.
Running Your Integrated Project
- Open your
.xcworkspace(if using CocoaPods) or.xcodeproj. - Select your target device/simulator.
- Press Cmd+R.
Key interactions in the running app:
- Swipe from the left edge to open the left menu (if
panFromEdge = YES, default). - Swipe from the right edge to open the right menu.
- Tap the menu button (if added) to toggle menus programmatically.
- Tap outside the menu or swipe content view to close.
5. Deployment
RESideMenu is a library, not a standalone application. "Deployment" means integrating it into your app and distributing your app.
For Development & Testing
- Test on multiple iOS versions (6.0+).
- Test on both iPhone and iPad if your app is universal.
- Test rotation if your app supports it.
For App Store Distribution
- Ensure your project's Deployment Target is set to iOS 6.0 or higher.
- Verify all required icons and launch images are set.
- Archive your app (Product > Archive).
- Validate and upload via Xcode Organizer or Transporter.
Note: RESideMenu uses ARC. If your project does not use ARC, you must add the -fobjc-arc compiler flag to the RESideMenu source files in Build Phases > Compile Sources.
6. Troubleshooting
Common Issues & Solutions
CocoaPods installation fails
- Ensure Git >= 1.8.0:
git --version - Update CocoaPods:
sudo gem install cocoapods - Run
pod repo updatethenpod install - Check network/firewall settings
"RESideMenu.h file not found"
- If using CocoaPods: Ensure you opened the
.xcworkspace, not.xcodeproj. - If manual: Verify the RESideMenu files are in your project and added to the target.
Menu doesn't appear / gestures not working
- Check
panGestureEnabledisYES(default). - Verify
panFromEdgeisYESif expecting edge swipe. - Ensure
panMinimumOpenThreshold(default 0) isn't set too high. - Confirm your content view controller's view isn't intercepting touches (e.g., a full-screen transparent view).
Parallax effect not working
- Set
backgroundImageproperty on the RESideMenu instance. - Ensure
scaleBackgroundImageViewisYES(default for parallax effect).
ARC errors in non-ARC project
- In Build Phases > Compile Sources, select all RESideMenu
.mfiles. - Add
-fobjc-arcto the Compiler Flags column for each file.
Storyboard IDs not recognized
- Double-check that the Storyboard IDs in Interface Builder exactly match the strings used in
instantiateViewControllerWithIdentifier:(case-sensitive). - Ensure the view controllers are in the same storyboard file as the RESideMenu subclass.
Content view doesn't scale with menu
- Verify
scaleContentViewisYES(default isYES). - Check
contentViewScaleValue(default 0.8). Adjust between 0.0 and 1.0.
Shadow not appearing on content view
- Ensure
contentViewShadowEnabledisYES. - Set
contentViewShadowColor,contentViewShadowOffset,contentViewShadowOpacity, andcontentViewShadowRadiusto visible values.
Menu view controllers not retaining
- Ensure you are not releasing menu view controllers prematurely if managing memory manually (ARC handles this).
For further issues, check the GitHub Issues page.