2017-09-14 5 views
1

왜 UIPickerView는 iOS11의 허가없이 사진 및 동영상을로드 할 수 있습니까? 권한 경고 팝업이 표시되지 않는 것 같습니다.UIImagePickerViewController iOS11 님의 앨범 권한을 활성화 할 수 없지만 사진 및 동영상을로드 할 수 있습니다.

iOS11 - GM xcode9 베타 4

새로운 빈 응용 프로그램 :

은 어떤 경고없이 쉽게 사진 라이브러리에 액세스 할 수 있습니다
#import "ViewController.h" 
#import <AVFoundation/AVFoundation.h> 

@interface ViewController() <UINavigationControllerDelegate,UIImagePickerControllerDelegate> 

@end 

@implementation ViewController 

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ 
    UIImagePickerController *vc = [[UIImagePickerController alloc] init]; 
    UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypePhotoLibrary; 
    UIImagePickerController *picker = [[UIImagePickerController alloc] init]; 
    picker.delegate = self; 
    picker.allowsEditing = YES; 
    picker.sourceType = sourceType; 
    vc.delegate = self; 
    [self presentViewController:vc animated:YES completion:nil]; 
} 

, 당신도 배경을 설정할 수있는 사진을로드 할 수 있습니다. 이 시스템 레버 버그입니까? 아니면 내가 잘못한거야?

PS : 아래 이미와의 Info.plist를 설정 :

NSPhotoLibraryAddUsageDescription

NSPhotoLibraryUsageDescription

photo

+1

먼저 앱을 삭제하고 다시 설치하고 – Govaadiyo

+1

질문을 수정하십시오. UIPickerView가 아닌 ​​UIImagePickerController입니다. – AshokPolu

답변

0

이 허가 한 번만 물어이다. 일단 허용하면 매번 알림을받지 못합니다. 그래서 다시 확인하고 싶다면 앱을 삭제하고 다시 설치하면 허락을 요청하는 알림 메시지가 나타납니다!

+0

경고 표시가 없기 때문에 허용 할 수 없으며 선택할 수 없습니다. 사진 라이브러리. 그것은 새로운 빈 응용 프로그램입니다. – GhostKnow