venmo / VENTouchLock

A Touch ID and Passcode framework used in the Venmo app.
MIT License
965 stars 114 forks source link

Demo automatically restart #68

Closed yeafel closed 8 years ago

yeafel commented 8 years ago

Runing Demo in iPhone6(iOS9.2),Foreground state,Opened the Touch ID,and When I killed Demo,Demo will automatically restart .But if Demo didEnterBackground,it can be killed.

yeafel commented 8 years ago
- (void)applicationDidEnterBackground:(NSNotification *)notification
{
    if ([self isPasscodeSet] && !self.backgroundLockVisible) {
        [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(lockApp) userInfo:nil repeats:NO];
    }
}
-(void)lockApp{
    [self lockFromBackground:YES];
}

this can solve my problem.