0
iPad 용으로 제작되었으므로 Popover에 UiImagePicker를 표시하려고합니다. 사진을 선택하고 imagePickerController되는 때 : didFinishPickingMediaWithInfo :iPad 시뮬레이터에서 UIImagePickerController가 작동을 멈 춥니 다.
명명 된 서비스 'com.apple.PersistentURLTranslator.Gatekeeper'을 (를) 찾을 수 없습니다 :가 트리거, 나는 다음과 같은 로그를 얻을. assetsd가 다운되었거나 잘못 구성되었습니다. 상황이 예상대로 작동하지 않습니다.
이 내 코드입니다 :
I가 없거나 잘못된 일을 할 수있는 무엇- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.allowsEditing = NO;
imagePickerController.delegate = self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// Check device
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
[self dismissModalViewControllerAnimated:YES];
}
else {
[popoverController dismissPopoverAnimated:YES];
}
// More code here to save the selected image
}
- (IBAction)showImagePicker:(id)sender
{
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
[self presentModalViewController:imagePickerController animated:YES];
}
else {
popoverController=[[UIPopoverController alloc]
initWithContentViewController:imagePickerController];
[popoverController presentPopoverFromRect:((UIButton *)sender).frame
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
}
? 감사!
고마워, 그게 ... 나는 프로젝트를 연 후 아이폰 시뮬레이터에서 앱을 처음 실행하면 iPad 시뮬레이터에 이러한 로그 메시지가 표시되고, viceversa가 표시됩니다. 나는 진짜 장치에서 달리려고 노력했다. – AppsDev