iOS loading显示在键盘上面

UIWindow *lastWindow = [[UIApplication sharedApplication].windows lastObject];
if (lastWindow == nil) {
lastWindow = [UIApplication sharedApplication].keyWindow;
}
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:lastWindow animated:YES];
[hud showAnimated:YES];

你可能感兴趣的:(iOS loading显示在键盘上面)