问题标签 [iphone-x]
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 - 适用于 iPhone X 的原始深度图 SDK
我进行了一些搜索,发现了各种示例、有关 iPhone X Face ID 的文档以及它如何用于身份验证、动画表情符号等各种内容。
想检查是否有 API/SDK 可以将原始深度图从 iPhone X 传感器获取到应用程序?
据我了解,深度计算是根据投影模式完成的。这可用于获取传感器前方任何物体的深度剖面。(可能取决于对象的纹理。)
swift - 游戏崩溃仅在 iPhone X 和 iPhone 8 Plus 上
我正在开发游戏,该游戏在所有 iPhone 和 iPad 上都能完美运行,除了 iPhone X 和 iPhone 8 Plus
当我将精灵添加到场景中时游戏崩溃(仅在 iPhone X 和 iPhone 8 Plus 上)因为精灵已经添加到场景中,在其他 iPhone 上应用程序没有崩溃,我认为错误在我的计时器中,也许是错误iPhone模拟器?你怎么看?
代码:
ios - iPhoneX and iPhone 8 keyboard height are different
I use below code to get keyboard height. Then use this height to calculate the frame of an UIView
to make sure this UIView
just on the top of the keyboard.
But in iPhoneX simulator the output is 333
and the iPhone 8 simulator is 258
.
ISSUE: If use rect.height
as the keyboard height for iPhone 8 simulator then the layout is correct. For iPhone X there's a gap between the UIView
and keyboard. Which means 333
is higher than the real keyboard height in iPhone X.
What's the reason of the height are different? And how to get the correct keyboard height?
Like this image, the green border should be the extra part. Actually, I need the red part just on the top of keyboard without the green rect gap.
EDIT
OK, with @Craig's help I found this method only called by iPhone X. So I update frame here. Just paste the code here.
The safe area bottom height is 22.0 seems not correct.
EDIT2
Normally view.safeAreaInsets.bottom
should be 34.0, but if you are using container view this value can be different like mine is 22.0.
ios11 - 新 iPhone X 的设计问题
我在模拟器上测试了我的应用程序iPhone X
,由于 iOS 系列中添加了新屏幕,在各种屏幕上我面临拉伸背景图像及其显示垂直间距问题,我希望我以前的应用程序在iPhone X
. 在所有 iPhone 设备(包括)上完美运行的宽高比应该是iPhone X
多少?
任何帮助将不胜感激。
ios - UIPageViewController 页面控件太靠近 iPhone X iOS 11 上的主页栏
我有一个带有一个主视图控制器的程序,其中包括一个按钮,用户可以点击该按钮以通过UIPageViewController
. 这 4 个页面是 QuickHelpViewController0ID - QuickHelpViewController3ID,每个页面都是标准的UIViewController
. 当他们点击按钮时,我运行这个:
当用户滚动到下一页/上一页时,我还提供了一个UIPageViewControllerDataSource
根据需要创建 4 个页面中的每一个。
这在 iOS 9.3 和 10.x 上运行良好。它也适用于除 iPhone X(模拟器)以外的所有设备的 11.0。在这方面,4 个页面指示点行位于屏幕底部,仅比 iOS 11 提供的新“主页栏”高 1 或 2 个像素(向上滑动以切换应用程序等)。
我发现了来自 Apple 的一个名为Building Apps for iPhone X的视频,其中开发人员讨论了解决类似问题,但在这种情况下,他的解决方案是简单地更改自动布局以将孩子限制UIPageControl
在底部“安全区域”而不是传统的底部布局指南。但我没有UIPageControl
在另一个视图控制器上使用;我正在使用UIPageViewController
,并且我看不到任何方法来控制页面控件沿窗口底部的位置。(是的,我在 Interface Builder 中启用了“使用安全区域布局指南”选项。)
我无法想象 iOS 11UIPageViewController
在我的场景中默认大小不正确,我也看不到任何明显的修复方法。有什么建议么?
ios11 - 从状态栏崩溃中获取蜂窝信号
下面是我的代码,我正在尝试通过状态栏获取信号强度。
崩溃发生在(iOS 11、Xcode 9、iPhone X):-
[UIStatusBar_Modern valueForUndefinedKey:]:这个类对于键foregroundView不兼容键值编码