快3网上购买

iOS调用系统照相机和相册

电脑杂谈  发布时间:2019-09-02 11:04:45  来源:网络整理

ios 打开系统相册_ios 打开相册_ios webview 打开相册

iOS 10 以后记得在plist里面添加获得拍照相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限ios 打开相册,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限,iOS 10 以后记得在plist里面添加获得拍照和相册权限ios 打开相册,iOS 10 以后记得在plist里面添加获得拍照和相册权限。

/**

* 调用照相机

*/

- (void)openCamera

{

UIImagePickerController *picker = [[UIImagePickerController alloc] init];

picker.delegate = self;

picker.allowsEditing = YES; //可编辑

//判断是否可以开启照相机

快3网上购买if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])

{

ios 打开系统相册_ios 打开相册_ios webview 打开相册

//

picker。sourceType = UIImagePickerControllerSourceTypeCamera;

[self presentViewController:picker animated:YES completion:nil];

}

else

{

NSLog(@"没有");

}

}

/**

* 打开相册

*/

ios 打开相册_ios webview 打开相册_ios 打开系统相册

-(void)openPhotoLibrary

{

快3网上购买// Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES

// 进入相册

if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])

{

UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];

imagePicker.allowsEditing = YES;

快3网上购买imagePicker。sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

imagePicker.delegate = self;

[self presentViewController:imagePicker animated:YES completion:^{

NSLog(@"打开相册");

ios 打开相册_ios 打开系统相册_ios webview 打开相册

}];

}

else

{

NSLog(@"不能打开相册");

}

}

#pragma mark - UIImagePickerControllerDelegate

// 拍照完成回调

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(nullable NSDictionary *)editingInfo NS_DEPRECATED_IOS(2_0, 3_0)

{

NSLog(@"finish。。");

ios 打开相册_ios 打开系统相册_ios webview 打开相册

快3网上购买if(picker.sourceType == UIImagePickerControllerSourceTypeCamera)

{

//图片存入相册

UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);

}

[self dismissViewControllerAnimated:YES completion:nil];

}

//进入拍摄页面单击更改按键

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker

{

[self dismissViewControllerAnimated:YES completion:nil];

}


本文来自电脑杂谈,转载请注明本文网址:
http://www.kadakong.com/a/ruanjian/article-121436-1.html

    相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    万发彩票登陆 快三网上投注 状元彩票平台 冠军彩票开户 快3网上购买 江西11选5 凤凰平台app下载 广西快3计划 新疆喜乐彩走势图 利来彩票开户