SVProgressHUD
Put down this code in your SVProgressHUD.m file line number 1356.
- (CGFloat)visibleKeyboardHeight {
#if !defined(SV_APP_EXTENSIONS)
UIWindow *keyboardWindow = nil;
for (UIWindow *testWindow in UIApplication.sharedApplication.windows) {
if (@available(iOS 11.0, *)) {
if([testWindow.class isEqual:NSClassFromString(@"UIRemoteKeyboardWindow")]) {
keyboardWindow = testWindow;
break;
}
} else {
if(![testWindow.class isEqual:UIWindow.class]) {
keyboardWindow = testWindow;
break;
}
}
}
for (__strong UIView *possibleKeyboard in keyboardWindow.subviews) {
NSString *viewName = NSStringFromClass(possibleKeyboard.class);
if([viewName hasPrefix:@"UI"]){
if([viewName hasSuffix:@"PeripheralHostView"] || [viewName hasSuffix:@"Keyboard"]){
return CGRectGetHeight(possibleKeyboard.bounds);
} else if ([viewName hasSuffix:@"InputSetContainerView"]){
for (__strong UIView *possibleKeyboardSubview in possibleKeyboard.subviews) {
viewName = NSStringFromClass(possibleKeyboardSubview.class);
if([viewName hasPrefix:@"UI"] && [viewName hasSuffix:@"InputSetHostView"]) {
return CGRectGetHeight(possibleKeyboardSubview.bounds);
}
}
}
}
}
#endif
return 0;
}
Nice articel, This article help me very well. Thank you. Also please check my article on my site ccavenue integration.
ReplyDeleteInteresting Article. Hoping that you will continue posting an article having a useful information. Renew Apple Developer Enterprise Program
ReplyDelete