I am having some trouble converting a PFFile array (named: activeimageFilearray) into a UIImage array (named: activeImageArray). My current for-in method only appends the first entry of the PFFile rather than appending all the entires in the PFFile array into my new UIImage array. So when i execute the last line of code, it would show [fatal error: Array index out of range] as the UIImage array only has one value. Thanks in advance.
for x in self.activeimageFileArray
{
x.getDataInBackgroundWithBlock({ (imageData: NSData?, error: NSError?) -> Void in
if error == nil
{
let image = UIImage(data: imageData!)
self.activeimageArray.append(image!)
}
println(self.activeimageArray)
self.venueImage.image = self.activeimageArray[1]
})
}