iOS 提示信息被键盘遮挡解决方案

//显示提示信息
UIWindow *view = [[[UIApplication sharedApplication] delegate] window];
NSArray *windows = [UIApplication sharedApplication].windows;
for (id windowView in windows) {
    NSString *viewName = NSStringFromClass([windowView class]);
    if ([@"UIRemoteKeyboardWindow" isEqualToString:viewName]) {
       view = windowView;
       break;
    }
}

if (view.hud) {
   return;
}
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];

你可能感兴趣的:(IOS)