dekatotoro / SlideMenuControllerSwift

iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.
MIT License
3.4k stars 754 forks source link

Left-menu is opening behind controller. (solved) #126

Closed pointphoton closed 8 years ago

pointphoton commented 8 years ago

01 . Image and video hosting by TinyPic

02 . Image and video hosting by TinyPic

03 . Image and video hosting by TinyPic

Hi Good days..

*\ Thank you in advance. Can you suggest me anything?

Pluto-Y commented 8 years ago

I can't review the picture.

pointphoton commented 8 years ago

Sorry, Images are fixed.

pointphoton commented 8 years ago

override func awakeFromNib() { if let controller = self.storyboard?.instantiateViewControllerWithIdentifier("Controller1ViewController") { self.mainViewController = controller } if let controller = self.storyboard?.instantiateViewControllerWithIdentifier("LeftViewController") { self.leftViewController = controller } super.awakeFromNib() }

Xcode is giving below exception, if I call this fuction in Controller1.

warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.

Thanks in advance. Have a nice day.

pointphoton commented 8 years ago

My problem is solved.

1- awakeFromNib() is removed.

2- Controller1 doesn't extends SlideMenuController anymore.

3- And I call these codes before controller1 is not opened.

  ` let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let mainViewController = storyboard.instantiateViewControllerWithIdentifier("Controller1ViewController") as! Controller1

    let leftViewController = storyboard.instantiateViewControllerWithIdentifier("LeftViewController") as! LeftViewController

    let nvc: UINavigationController = UINavigationController(rootViewController: mainViewController)

   leftViewController.mainViewController = nvc
   let slideMenuController = SlideMenuController(mainViewController:nvc, leftMenuViewController: leftViewController)
    // navigate to next view
    self.presentViewController(slideMenuController, animated: false, completion: nil)`