UIImagePickerController does not work correct on i

2019-02-01 05:21发布

After update ipad to ios 9.3 images are stop to display. What can be wrong with it? On iOS 9 and iOS 9.2 that was work as well. On other devices iPhone devices all work fine.

 private func presentPickerForLibrary() {
    let imagePicker = UIImagePickerController()
    imagePicker.allowsEditing = false
    imagePicker.sourceType = .PhotoLibrary
    imagePicker.delegate = self
    presentViewController(imagePicker, animated: true, completion: nil)
}

don't show preview

don't show preview

2条回答
甜甜的少女心
2楼-- · 2019-02-01 05:52

Seems to be linked to iCloud Photo Library setting. Turning this on in Preferences fixes the issue for me.

查看更多
祖国的老花朵
3楼-- · 2019-02-01 05:57

I'm seeing this as well in an older, non-universal, iPhone app when running it on an iPad running iOS 9.3. I do not see it when running on an iPad simulator, only an actual device.

I am not seeing it in a newer, universal iPhone/iPad app. It looks like the issue is only affecting iPhone apps when run in 2x/1x mode on an iPad running iOS 9.3.x

It looks like there is an open Rdar ticket describing the issue, https://openradar.appspot.com/25813088.

I also came across a thread on the Apple developer forms also describing the issue, https://forums.developer.apple.com/thread/43400.

The iPhone app I'm testing with is still using the now deprecated ALAssets API. It looks like [ALAsset thumbnail] is returning nil when running an iPhone app on an iPad running iOS 9.3.x, this may be related to why the UIImagePickerController is not displaying thumbnails.

查看更多
登录 后发表回答