1

My client wanted a navigation drawer (hamburger menu) on the top-left corner of the navigation bar (yes, they know it's not adherent to the iOS design principles, but they want regardless).

I have the hamburger setup as a custom icon with a segue that pushes to the menu viewcontroller (MenuViewController)

The problem was the client said it slid out from the right, and closes to the left (which is standard with Apple). They want to reverse it.

So I need to reverse both animations (slide in, and slide out)

To do the first part, I followed this, which worked perfectly: iOS Segue - Left to Right -

So now after applying that custom code it slides in beautifully from the left.

But now I want the drawer to slide back to the left, but of course by default it goes to the right when I click the < navigation arrow on the top of MenuViewController.

Any ideas how I could go about reversing this? I was thinking custom unwind segue, but I don't actually HAVE a segue on the storyboard because this is just a back button being generated as a result of pushing the MenuViewController to the navigation stack.

My guess is to create some sort of override for unwind on the MenuViewController.swift file, but I haven't had success so far.

Could anyone point me in the right direction?

Thanks!

NullHypothesis
  • 4,286
  • 6
  • 37
  • 79

0 Answers0