I'm new to Swift and have been trying various thing for many hours now.
Here's how my app looks like:
Ideally I want them to click an option from this pop out menu that will take them to another view. Right now, I'm on the QuotesTimelineViewController but say I want to click on the bookmark button then I'd want to go to the SavedQuotesViewController.
Here is how my storyboard looks like:
The QuotesViewController has a NavigationController embedded in it. When you click the menu button it goes to the NavigationSideController which is presented modally. Now I don't know how to make the segues for what I want to accomplish next.
Here is my code for the NavigationSideController so right now what happens when you click on an icon in the navigationsidebar it dismisses that animation and the navigationsidebar goes away. Maybe you can see all the commented out code.
And here's some relevant code (I think) from QuotesTimelineViewController:
But there could be something I'm missing so if you want to look at my whole repo it's here: https://github.com/mayaah/ios-decal-proj4
Any guidance would be so helpful! Eventually I'd like that whenever I click on an icon in the navigationsidebar the view controller corresponding to that icon opens up. The most progress i've made so far was getting a window hierarchy error! I guess because when I click on an icon, QuotesTimelineViewController isn't the at the top of the stack or something I don't know.
I can propose two solutions here
Use a Navigation Controller and change Active VC on table selection
The basic idea is to make a new navigationController in your app delegate and make all different type of entry points. so in your app delegate, declare a new
UINavigationController
variable.You wont be using the storyboard initialVC in this approach. in
didFinishLaunching
Method of app delegateand then in your side menu, you update the navController's viewControllers with new VC
This is still rough but gives the idea of what you need to manage the heirarchy. Let me know if any clarification is needed.