关闭 iPhone 或 iPod touch 设备上依赖的功能
我有一个我认为相对简单的问题,但我还找不到答案。我有一个 iPhone 应用程序,它在其中一个屏幕上使用 GPS。我想在应用程序加载时使用代码禁用此屏幕,因此在使用 iPod touch 时禁用它。因此它在 iPod touch 上仍然有用,因为 iPod touch 用户可以使用很多功能。
谢谢。
I have what i thought was a relatively simple question but i cannot find an answer to it yet. I have an iPhone app that uses GPS on one of its screens. I want to disable this screen using code when the app loads,so disable it when a iPod touch is being used. This is so it can still be useful on a iPod touch as there is a lot of functionality that a iPod touch user can use.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

获取设备信息..
http: //developer.apple.com/library/ios/#documentation/UIKit/Reference/UIDevice_Class/Reference/UIDevice.html
我认为如果您只是检查 GPS 那么您将需要访问 CLLocationManager 来查看是否它打开或关闭
to get the device info..
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIDevice_Class/Reference/UIDevice.html
I think if you are just checking for GPS then you will need to access the CLLocationManager to see if it is on or off