خرید بک لینک

Vote count: 0

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:

Greyed image

This image is passed to the coectionDidFinishLoading as completed but clearly isn't. Anyone have any ideas as to why this would happen?

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 10 ارديبهشت 1395 ساعت: 20:51

صفحه بندی