I'm currently trying to create a progressive JPG loader. When a large image is passed into my NSURLCoection it seems to cut half of the image away.
Here is my didReceiveData method and the image the data is assigned to:
func coection(coection: NSURLCoection!, didReceiveData data: NSData!){
if let img: UIImage = UIImage(data: data){
imageView.image = img
}
print("didReceiveData")
}
It seems to skip the last chunk of data to complete the image. An example image is:
This image is passed to the coectionDidFinishLoading as completed but clearly isn't. Anyone have any ideas as to why this would happen?

