ipad 2摄像机支持检测 [英] ipad 2 camera support detection

查看:142
本文介绍了ipad 2摄像机支持检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序使用以下宏:



#define IS_IPAD([[UIDevice currentDevice] respondingToSelector:@selector(userInterfaceIdiom) ]&&&& [UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)



b
$ b

但是,我使用它来关闭在应用中拍照的选项。



如何检测

解决方案


[UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];


这应该可以工作


I have an app that uses the following Macro:

#define IS_IPAD ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)

which works very well for me.

However, I was using it to turn off the option of taking a photo in the app.

How can I detect if the camera option is available regardless of device?

解决方案

[UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];

That should work

这篇关于ipad 2摄像机支持检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆