浏览代码

Merge pull request #149 from UnityTech/iphoneplus_keyboardbug

iphone plus bug fix
/main
GitHub 5 年前
当前提交
d3f1bf39
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
      Runtime/Plugins/platform/ios/UIWidgetsViewController.mm

6
Runtime/Plugins/platform/ios/UIWidgetsViewController.mm


CGFloat bottom = CGRectGetHeight([[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]);
CGFloat scale = [UIScreen mainScreen].scale;
// scale == 3 => screen is 1242 * 2208 => we have to perform down-sampling to obtain the real length
// 0.8696 = 1920 / 2208, the vertical down-sampling ratio
if (scale == 3) {
bottom = bottom * 0.8696;
}
viewInsets.bottom = bottom * scale;
padding.bottom = 0;

正在加载...
取消
保存