I would like my iOS 7 app running on the iPad Mini to detect if there is something close to the proximity sensor (within six inches)

Does iPad Mini have a proximity sensor?

Is it accessible via a API?

有帮助吗?

解决方案

Yes it does. See this for more info.

Additionally, you can enable proximity monitoring on [UIDevice currentDevice], and read its proximity state property.

More info is in the Apple dev documentation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top