0

I am using left side menu from this pod using storyboard. sidemenu is working fine in Swift 4.2 version pod. but I have updated pod in Swift 5 here I am not getting this menu in attribute inspector to give left side menu on,

enter image description here

in Swift 5 pod 'SideMenu', '~> 6.0' I am getting full menu from below, I am not getting left side menu.

that's why I am trying to add this code in appDelegate:

 let leftMenuNavigationController = SideMenuNavigationController(rootViewController: YourViewController)
 SideMenuManager.default.leftMenuNavigationController = leftMenuNavigationController

but here what should I write in YourViewController place

in console I am getting like below:

Failed to set (leftSide) user defined inspected property on (UINavigationController): [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key leftSide.

This is small demo project you can find pod installing and error here github project

I need side menu like this.. I use to get like this in Swift 4 pod

enter image description here

How do I add left side menu in updated version?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Swift
  • 1,074
  • 12
  • 46

1 Answers1

2

I just checked your project. The segue that you have created is of kind "Present Modally", just change it to "Push"

Present Modally is like presenting a popup and so its default animation is bottom to top.

Push has a default animation of right to left.

enter image description here

Also, you are not using the latest pod version. Update you pod.

enter image description here

And then I removed the class name from SideMenuNavigationController and assigned it again. Wait for Xcode to suggest the name by itself then press enter.

enter image description here

Final Result

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
Keshu R.
  • 5,045
  • 1
  • 18
  • 38
  • Have you got left side menu?? as you mentioned i changed button segue to `kind Show (e.g. push)` but same getting from below only why?? did u changed anything else in code?? please help – Swift Dec 28 '19 at 08:24
  • yes like your out put i am also getting, but i want side menu on the background view like i have updated question with screen shot in pod swift4. how do i achieve like above.. here background view also moving – Swift Dec 28 '19 at 09:39
  • please try to fix this issue.. i will upvote and i do accept for sure :) – Swift Dec 28 '19 at 09:43
  • For that you will have to make changes in SideMenuPresentationStyle. Play with the code. I can't do your entire homework for you, just help you with it :) – Keshu R. Dec 28 '19 at 10:18
  • Okay no problem, I did upvote for your time spent on my code, but i cant accept because if i give `present modally` segue also working fine, thank you!!! – Swift Dec 28 '19 at 11:06