if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { // 相机不可用 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"您的设备不支持拍照!" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]; [alert
show]; return; }
iOS判断设备的相机是否可用
最新推荐文章于 2025-08-07 16:13:49 发布