Skip to content
This repository was archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
Move callback execution to completion handler of dismissViewControlle…
Browse files Browse the repository at this point in the history
…rAnimated
  • Loading branch information
brianneisler committed Jan 20, 2016
1 parent 48637e0 commit a9f8236
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions objc/core/A0LockReact.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ - (void)hideWithCallback:(A0LockCallback)callback {
return;
}
UIViewController *controller = [[[[UIApplication sharedApplication] windows] firstObject] rootViewController];
[controller dismissViewControllerAnimated:YES completion:nil];
self.shown = NO;
[controller dismissViewControllerAnimated:YES completion:^{
self.shown = NO;
callback(@[]);
}];
} else {
callback(@[]);
}
callback(@[]);
}

- (void)showWithOptions:(NSDictionary *)options callback:(A0LockCallback)callback {
Expand Down

0 comments on commit a9f8236

Please sign in to comment.