मैं सोच रहा था कि कोई मेरी मदद कर सकता है, मैं विकसित करने वाले ऐप के लिए नया हूं, मैं अपने ऐप से छवियों को पार्स प्रलेखन से मदद के साथ कोई समस्या नहीं पा रहा हूं।मैं तेजी से पार्स से एक छवि कैसे लोड करूं?
let imageData = UIImagePNGRepresentation(scaledImage)
let imageFile: PFFile = PFFile(data: imageData)
var userPhoto = PFObject(className: "postString")
userPhoto["imageFile"] = imageFile
userPhoto.saveInBackground()
लेकिन जब मैं छवि वापस पुनः प्राप्त करने के लिए कोड जोड़ने के लिए, मैं थोड़ा खो कर रहा हूँ:/
let userImageFile = anotherPhoto["imageFile"] as PFFile
userImageFile.getDataInBackgroundWithBlock {
(imageData: NSData!, error: NSError!) -> Void in
if !error {
let image = UIImage(data:imageData)
}
}
जहां "anotherPhoto" से आ रहा है? अपने postString
(अपने अपलोड उदाहरण में userPhoto
)
यह स्पष्ट नहीं है कि आप क्या पूछ रहे हैं। यह विशेष रूप से स्विफ्ट के बजाय पार्स एपीआई के बारे में एक प्रश्न की तरह दिखता है। – Bill