objective c - Copy image from assets-library to an app folder -
i have uiimagepickercontroller , save selected image app. can easy getting current uiimage , save (by creating file) prefer directly copy file library folder. have url of selected image : uiimagepickercontrollerreferenceurl return specific pattern "assets-library". tried copy image kind of url path without success.
is there way success on ? !
you can through 2 ways
first way: using imagepickercontroller didfinishpickingmediawithinfo
delegate
- (void)imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info { uiimage *selectedimage = [info valueforkey:uiimagepickercontrolleroriginalimage]; //save selectedimage document directory }
second way: using alassetlibrary
.
for have save alasset url
, retrieve image using alassetlibrary
, please refer my answer details .just put alasset url
instead of asseturl
Comments
Post a Comment