Side Menu Navigation in Swift
=============================

Swift 4.2, Xcode 10.0
---------------------

My ultimate goal is to be able to easily (normally) transverse/navigate through my view controllers like as shown below.

[![Navigation](https://i.stack.imgur.com/Bl9ch.gif)](https://i.stack.imgur.com/Bl9ch.gif)

I want to be able to navigate from view controller to view controller with a common side menu. To this point, I have come up with an incredibly *hacky* way to accomplish this wherein when I select a view controller in the side menu, it goes dismisses the side menu, then it precedes to present the next view controller from that one, and assuming that is not the target view controller, a window temporarily covers its contents while I segue from that view controller to the target view controller. 

[![Path through storyboard](https://i.stack.imgur.com/fgmRJ.png)](https://i.stack.imgur.com/fgmRJ.png)

### Unique paths of view controllers to display from side menu.

[![Animation Paths](https://i.stack.imgur.com/47Ism.png)](https://i.stack.imgur.com/47Ism.png)
**Note:** *each colour in the above image is another path the app can take after something have being tapped in the side menu.*

There are so many things wrong with this implementation I don't even know where to start. On rare occasions, you can see the contents of the intermediary view controller in between segues. Also the animation can be a bit choppy and distorted due to the amount of segues requires to actually get to the target view in some cases. Not to mention the immense difficulty and complexity now required to add another row to my side menu. And I know full well this is atrocious and am desperately trying to find a solution not my complex navigational problem. Of recent I have experimented with using container views and putting my side menu at the bottom of my stack rather than at the top as is right now, but it hasn't amounted to anything.

---

The past few weeks I have been driving myself insane trying to find out how to do this. I have found countless implementations of side menus, but all that I have found to this date will only show the side menu on only one view controller instead of showing up on all of the side menu's target and treating them if they are all *on the same level* so to say. In essence, the side menu needs to be able to come up on all of the 3 view controllers and take away the need to *hackily* segue over a view controller. As well, it would be quite ideal if this side menu is easily scalable so I can add multiple sections to the side menu with ease.

---