ipad - IOS Photos - Requesting Image for Asset with Swift -
i have updated post on 10 april 2015 new info ...
i have app copying contents of cloud photo album local album on ios device. using following code :
func fetchfullsizeimageforasset(asset:phasset) -> (uiimage)? { // image asset ( nil ) var myimage:uiimage? let requestoptions = phimagerequestoptions() requestoptions.synchronous = true requestoptions.networkaccessallowed = true requestoptions.deliverymode = .highqualityformat let screensize: cgsize = uiscreen.mainscreen().bounds.size let targetsize = cgsizemake(screensize.width, screensize.height) let imagemanager = phimagemanager() imagemanager.requestimageforasset(asset phasset, targetsize: targetsize, // targetsize: phimagemanagermaximumsize, gives null image ! contentmode: .aspectfit, options: requestoptions, resulthandler: { (result, info) -> void in myimage = result }) return myimage }
my idea myimage above code, , copy new local album.
this gives me low quality image (256 x 256) of time, high quality image (640 x 640). have looked @ cloud album images in new photos app on 10.10.3, , high quality (640 x 640)
when use photos @ shared album on ipad, images become high quality when click on them - expected behaviour.
what baffling me these manually clicked images import in high quality when rerun app !
is bug in photokit on ios8 or missing ?