Skip to content

Commit

Permalink
Merge pull request #52 from lhnoah/master
Browse files Browse the repository at this point in the history
Fix bug: keyboard cover LCActionSheet in iOS 9
  • Loading branch information
iTofu committed Nov 30, 2017
2 parents 949b907 + 5c7fbb1 commit 2f2c18f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/LCActionSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,11 @@ - (void)show {
viewController.statusBarStyle = [UIApplication sharedApplication].statusBarStyle;

UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
window.windowLevel = UIWindowLevelAlert;
if ([UIDevice currentDevice].systemVersion.intValue == 9) { // Fix bug for keyboard in iOS 9
window.windowLevel = CGFLOAT_MAX;
} else {
window.windowLevel = UIWindowLevelAlert;
}
window.rootViewController = viewController;
[window makeKeyAndVisible];
self.window = window;
Expand Down

0 comments on commit 2f2c18f

Please sign in to comment.