mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
[Chat perm] add alertView on chat add picture from library if no permission
This commit is contained in:
parent
0251b6e123
commit
dd789a5ed6
9 changed files with 6 additions and 1 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#import <MobileCoreServices/UTCoreTypes.h>
|
||||
#import <AVFoundation/AVCaptureDevice.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <Photos/Photos.h>
|
||||
#import "ImagePickerView.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
|
|
@ -237,7 +238,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Photo library", nil)
|
||||
block:^() {
|
||||
block(UIImagePickerControllerSourceTypePhotoLibrary);
|
||||
if([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized ){
|
||||
block(UIImagePickerControllerSourceTypePhotoLibrary);
|
||||
}else{
|
||||
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Camera's permission", nil) message:NSLocalizedString(@"Camera not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
|
||||
}
|
||||
}];
|
||||
}
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:nil];
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue