Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11 这个方法生成的image为nil,闭包返回不了图片数组 #10

Open
tianzhilan0 opened this issue May 10, 2018 · 0 comments

Comments

@tianzhilan0
Copy link

        imageManeger.requestImage(for: asset, targetSize: bigSize, contentMode: .aspectFit, options: bigOptions, resultHandler: { (image, info) in
            if image != nil{
                model.bigImage = image!
                
                imageManeger.requestImage(for: asset, targetSize: smallSize, contentMode: .aspectFit, options: smallOptions, resultHandler: { (image, info) in
                    if image != nil{
                        model.smallImage = image!
                        
                        imageManeger.requestImageData(for: asset, options: bigOptions, resultHandler: { (data, str, imageOrientation, info) in
                            if data != nil{
                                model.imageData = data!
                                modelArr.append(model)
                                if modelArr.count == photos.count{
                                    DispatchQueue.main.async {
                                        imageData(modelArr.sorted(by: { return $0.order < $1.order }))
                                    }
                                }
                            }
                        })
                    }
                })
            }
        })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant