Skip to content

Instantly share code, notes, and snippets.

@alimoeeny
Created February 19, 2015 00:52
Show Gist options
  • Save alimoeeny/85b107ddabc345f766e1 to your computer and use it in GitHub Desktop.
Save alimoeeny/85b107ddabc345f766e1 to your computer and use it in GitHub Desktop.
var window: UIWindow?
var sideMenuViewController: RESideMenu?
var rootTabVC: UITabBarController?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// about
var about : AboutViewController = AboutViewController(nibName: "AboutView_iphone", bundle: nil)
about.title = "About"
// tutorial
var tutorial: TutorialViewController = TutorialViewController(nibName: "TutorialView_iphone", bundle: nil)
tutorial.title = "Tutorial"
rootTabVC = UITabBarController()
rootTabVC?.tabBar.hidden = true
rootTabVC?.addChildViewController(about) // 0
rootTabVC?.addChildViewController(tutorial) // 1
window = UIWindow(frame: UIScreen.mainScreen().bounds)
// side menus ---------------------------------------------------------------
let lmVC = LeftMenuViewController(nibName: "LeftMenuView_iphone", bundle: nil)
let rmVC = RightMenuViewController(nibName: "RightMenuView_iphone", bundle: nil)
sideMenuViewController = RESideMenu(
contentViewController: rootTabVC,
leftMenuViewController: lmVC,
rightMenuViewController: rmVC)
window?.rootViewController = sideMenuViewController;
// side menus ----------------------------------------------------------------
window?.makeKeyAndVisible()
return true
}
@washswiftmeet
Copy link

I added RESideMenu to my iPhone version and it works and looks great! It is especially valuable because there are options like select a trip, settings and share that should be available for all tabs and was not possible before with just the left and right bar button items. Thanks again and I look forward to showing it to you next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment