gpt4 book ai didi

iPhone等: how to tell if the device has a camera?

转载 作者:行者123 更新时间:2023-12-03 18:31:13 26 4
gpt4 key购买 nike

版本 3.1.3(如果相关)。

这个建议现在可能有效,但将来会有效吗?

NSString *device = [UIDevice currentDevice].model;

if([device isEqualToString:@"iPhone"])

最佳答案

#define SOURCETYPE UIImagePickerControllerSourceTypeCamera

// does the device have a camera?
if ([UIImagePickerController isSourceTypeAvailable:SOURCETYPE]) {
// if so, does that camera support video?
NSArray *mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:SOURCETYPE];
bool isA3GS = [mediaTypes containsObject:(NSString*)kUTTypeMovie];
}

关于iPhone等: how to tell if the device has a camera?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3157170/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com