我有一个使用以下宏的应用:
#define IS_IPAD ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
这对我来说效果很好。
但是,我用它来关闭应用程序中拍照的选项。
无论设备如何,如何检测相机选项是否可用?
最佳答案
[UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];
这应该行得通
关于iphone - ipad 2 摄像头支持检测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5863328/