Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

How to add back button from destination controller to root controller? I can't add action

How to add back button from destination controller to root controller? I can't add action. I am using Swift as a language

1 Answer

embed your root view controller in a navigation controller. that would give you a back button automagically. you would not have to worry about making it yourself.

Thank you.

@ Stone Preston.

I have implemented a Slide-out Sidebar Menu using SWRevealViewController. However, no longer have a back button from the destination view controller to the root view controller even though both the destination view controller and the root view controller have been embed in navigation view controllers.