Making a Slide Out Menu (Swift in Xcode : SWRevealViewController)

Jared Davidson · 172K views · 2015 · 24:50

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed to add an SWRevealViewController slide-out menu in Swift, usually when asking about bugs, crashes or navigation bar problems that came up afterwards.

Recommended by 2 people across 2 different months, 2015 to 2016.

What it is

A 25-minute Swift and Xcode tutorial by Jared Davidson that walks through building a slide-out (hamburger) side menu using the SWRevealViewController library. It covers wiring up the menu button, a table-based menu, and segues to content screens, with downloadable project files.

What people said

Recommends Mukund Agarwal · 2015-08 · Stack Overflow · on “programatically loading controllers using SWRevealViewController and Swift”

I ran in to the same error while implementing this. I missed the step of connecting the menuButton as an outlet to the ViewController by Ctrl dragging over which results in @IBOutlet weak var menuButton: UIBarButtonItem! I hope this is the same issue causing your error. You can also use the following tutorial: [this video]

Recommends MateGreat · 2015-12 · Stack Overflow · on “Exc_bad_instruction with SWRevealViewController”

Background My app has one MainViewController with a UIButton which leads to another ViewController when pressed. In the second ViewController is a UIBarButtonItem which has a "Back" segue to the MainViewController. Everything has worked fine, until now when I programmed a slide out menu with help from SWRevealViewController and I followed this Jared Davidson tutorial [this video] (simple, general and easy) Problem The slide out menu works perfectly, but now when the "Back" button in the second ViewController is pressed crashes the app due to EXC_BAD_INSTRUCTION (code=EXC_I1386_INVOP, subcode=0x0) from the following code in the MainViewController file, regarding the pan gesture for the slide out m

Cites T_C · 2015-05 · Stack Overflow · on “Implementing SWRevealViewConroller Library (slide out menu) in multiple storyboards”

I am trying to implement SWRevealViewController Library as given in VideoTutorial [this video] , I was successfully able to do that but I don't want everything on 1 storyboard, I want to break it down in 2 storyboards AppDelegate Code: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { storyboard = UIStoryboard(name: "MenuDrawer", bundle: nil) initialViewController = storyboard.instantiateViewControllerWithIdentifier("SWRevealViewController") as! UIViewController self.window?.rootViewController = initialViewController self.window?.makeKeyAndVisible() return true } Rightnow MenuDrawer storyboard has everything SWRevealViewCOn

Cites Travis · 2015-06 · Stack Overflow · on “getting an error xcode 6.3.2 UITableViewCell”

Hey guys im new to xcode and programming im trying out this tutorial on making a slide out menu [this video] I cant get it working i downloaded the finished project files found here: [LINK] I cant get it to work var cell = tableView.dequeueReusableCellWithIdentifier(TableArray[indexPath.row], forIndexPath: indexPath) as UITableViewCell coming up with error anyobject is not convertible to UITableViewCell did you mean to use "as!" to force downcast? any help would be greatly appreciated Im 100% it has something to do with my version of xcode so hopefully something simple cheers travis

Cites Gunaseelan · 2015-10 · Stack Overflow · on “Show navigation bar in swrevealviewcontroller”

I am using SWRevealViewController [LINK] for side menu in my app. While choose one of the menu navigationbar hides automatically. I want to show the navigation bar always. I have tried following codes in my ViewController 's viewDidLoad() . self.revealViewController().navigationController?.navigationBarHidden = false and self.navigationController?.navigationBarHidden = false But both are not working. I have followed [this video] to implement SWRevealViewController [LINK] in swift based app.

Cites krikor Herlopian · 2016-11 · Stack Overflow · on “SWRevealViewController seque disappears navigation controller”

I implemented this tutorial [this video] . However with difference, instead of doing my seque from talecell to viewcontroller.I did it from entire tableview to view controller.On click of table row, i call it. func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { performSegue(withIdentifier: "showcheckin", sender: self) } What happens is that, navigation bar item on top disappears.

Cites krikor Herlopian · 2016-11 · Stack Overflow · on “SWRevealViewController NOT working”

I simply implemented this tutorial [this video] until minute 8:35 , and it did not work. import Foundation class ViewController: UIViewController { @IBOutlet weak var Open: UIBarButtonItem! override func viewDidLoad() { super.viewDidLoad() print("open") Open.target = self.revealViewController() Open.action = Selector("revealToggle:") print("open2") } override func viewDidAppear(_ animated: Bool) { } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }} However, its worth to note. I am getting to this page after splash screen page.And below how am doing it let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = sto