rocky171 rocky171 - 1 year ago 69
iOS Question

Logout App after fixed time in iOS

hi all i am new to the iOS programming please help me..... Thanks in advance..
I want to add logout functionality in my app, so that user get logout after fixed interval from login time(2 hrs).
Please suggest me the way to implement this functionality

Answer Source

you can implement this functionality using NSTimer

[NSTimer scheduledTimerWithTimeInterval:@"time" target:self selector:@selector(targetMethod:) userInfo:nil repeats:NO];

      //enter code here`
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download