0

I have a login view controller which is outside my navigation controller. When a user logs out, I want them to be back to the login view controller. I am using SWRevealViewController and Storyboards.

User Flow:

-> Login View Controller -> SWRevealViewController-> UINavigationController

JAL
  • 41,701
  • 23
  • 172
  • 300
Asif Alamgir
  • 1,454
  • 1
  • 16
  • 41

1 Answers1

1

Just set window.rootViewController to the login view controller.

rounak
  • 9,217
  • 3
  • 42
  • 59
  • That worked, but will it clear nav controller from memory or do I have to handle garbage collection. I am using ARC – Asif Alamgir Jun 22 '15 at 16:40
  • 1
    @AsifAlamgir It should release the nav controller unless you're explicitly retaining them somewhere in your code. – rounak Jun 22 '15 at 16:43