问题标签 [iphone11]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - 从 UIScreen.main.bounds 确定 UIInputViewController 的安全区域
我正在使用 UIInputViewController 制作自定义键盘。
我想在一个矩形内显示一个 xib 布局。现在,我确定了 CGRect 的正确大小,我将我的 xib 布局放置在其中,UIScreen.main.bounds
从 但是,UIScrren.main.bounds.width
当我将 iPhone 11 旋转到横向时,它比安全区域宽度长。结果,我的矩形太宽了,一部分没有显示出来。
iphone11屏幕
如何确定安全界限?我想用类似UIScreen.main.bounds
的东西代替,UIScreen.main.safeArea
但似乎我必须做一些比这更复杂的事情。
我应该使用UIScreen.main.nativeBounds
吗?如果是这样,我不确定如何从像素转换为点。
flutter - 在 iPhone 11 中打开键盘时图像向下
我已将全屏图像用作背景图像,并TextField
在图像顶部放置了一个。因此,当键盘打开时,iPhone11 中的背景图像会稍微下降,而关闭键盘图像时,它会按原样移动。下面的代码在我的 android 设备 [Asus Zenfone Max Pro M1] 和 iPhone 8 Simulator 中正常工作
我的代码片段