ipad 2 camera support detection
问题 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? 回答1: [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; That