Monday, 15 April 2013

xcode - upload an image as profile photo in iOS app with Swift -



xcode - upload an image as profile photo in iOS app with Swift -

in ios app want upload image profile photo. so, need icon upload image , popup or such user interface create photo photographic camera or upload photo album on device. should facebook.

i created app xcode 6 , swift. there ideas, solutions or other information?

thx!

i've solved problem next code:

func takephoto(sender: anyobject) { if (uiimagepickercontroller.issourcetypeavailable(uiimagepickercontrollersourcetype.camera)){ var picker = uiimagepickercontroller() picker.delegate = self picker.sourcetype = uiimagepickercontrollersourcetype.camera var mediatypes: array<anyobject> = [kuttypeimage] picker.mediatypes = mediatypes picker.allowsediting = true self.presentviewcontroller(picker, animated: true, completion: nil) } else{ nslog("no camera.") } } func imagepickercontroller(picker: uiimagepickercontroller!, didfinishpickingimage image: uiimage!, editinginfo: nsdictionary!) { allow selectedimage : uiimage = image }

ios xcode image swift

No comments:

Post a Comment