iOS11的用户会出现SVProgressHUD提示框不居中(向上偏移),解决办法替换SVProgressHUD.m文件夹里面
return CGRectGetHeight(possibleKeyboardSubview.bounds);
将这句话替换成
CGRect convertedRect = [possibleKeyboard convertRect:possibleKeyboardSubview.frame toView:self];
CGRect intersectedRect = CGRectIntersection(convertedRect, self.bounds);
if (!CGRectIsNull(intersectedRect)) {
return CGRectGetHeight(intersectedRect);
}
即可.
参考链接:
https://github.com/SVProgressHUD/SVProgressHUD/pull/846/files/981c7b58973e4b3382395ffbd701989207c77959