问题
I made an image editing app for iPhone
, and it got rejected because the app is not able to run on ipad
at iphone resolution
. It failed in both 1x
and 2x
resolution
.
When I click choose photo
, I present the camera picker
to select a pic, but camera picker
is not showing any images
in the simulator
.(I didnt test this in real device, I beleive apple will test this in real device) It works normally in iPhone
, and also in iPad
if I make the app Universal
.
But If I make the app compatible for iPhone
, then it should also run in iPad
at iPhone
resolution, which is not happening in my case!!!
Here are the screenshots of ipad pro simulator
:
After I choose the pic, it should display in the imageview, but I get the blank imageview without image.
I dont have anything fancy in code. It is a routine camera picker:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:picker animated:YES completion:NULL];
- I did try to put a
breakpoint
whilepicker
is presented and after the image is selected. Thepicker
and the selected image is not nil, but when I preview the selectedimage
onxcode
, it shows a blankimage
:
- Surprisingly, when I run the app in iphone simulator xcode showed the image:
NOTE:
- When run the app on
iphone simulator
for the first time,camera picker
askedpermission
to access the photos.But When I run it oniPad
atiPhone
resolution
,picker
didnt asked for any permission!!!!
来源:https://stackoverflow.com/questions/33942311/unable-to-see-images-in-camera-roll-in-ipad-simulator-when-run-at-iphone-resolut