Swift, How to get the image path from UIPickerView in iOS? -
in android there way take selected image path , display in our app. there way same thing in ios too? select image picker view, take image path , display in app?
uiimagepickercontrolleroriginalimage
returns image's data, no reference local storage.
func imagepickercontroller(picker: uiimagepickercontroller, didfinishpickingmediawithinfo info: [nsobject : anyobject]) { if let localurl = (info[uiimagepickercontrollermediaurl] ?? info[uiimagepickercontrollerreferenceurl]) as? nsurl { print (localurl) //if want image name let imagename = localurl.path!.lastpathcomponent } }
for more see link
Comments
Post a Comment