ios - Logout SWReveal View Controller -


hello new ios , have difficulty issues. using swrevealviewcontroller , need log in , logout it.

i switch between login screen , main screen in appdelegate

bool isloggedin = [[nsuserdefaults standarduserdefaults] objectforkey:@"islogin"]; nsstring *storyboardid = isloggedin ? @"login_screen" : @"main_screen"; self.window.rootviewcontroller = [self.window.rootviewcontroller.storyboard instantiateviewcontrollerwithidentifier:storyboardid]; 

in login view controller (i have uses show details segue)

[self performseguewithidentifier:@"login" sender:self]; 

in right reveal menu logout tableviewcell selected (also show detail segue)

[self performseguewithidentifier:@"logout" sender:self]; 

my question if user login , logout multiple times viewcontrollers go stack , allocate memory.

i have used show detail segue since thought replace previous view controller , front view controller?

am in right way? please help

you can use msdynamicsdrawerviewcontroller logout functionality. can use swrevealviewcontroller, need manually add functionality of logout, because swrevealcontroller can not provide logout functionality. check demo how use swrevealcontroller in swift, if using swift.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -