Closed iuriivolochai closed 8 years ago
SWIFT 3 func loadImage(with request: Request, into target: AnyObject, handler: @escaping Manager.Handler)
Do not set image to 'into' image view: code example
if let imageURL = viewModel?.bannerImageURL { let request = Request(urlRequest: URLRequest(url: imageURL)) Nuke.loadImage(with: request, into: bannerImageView) {[weak self, weak viewModel] response, isFromMemoryCache in guard let strongSelf = self else { return } guard let strongViewModel = viewModel else { return } if case .fulfilled(let image) = response { // bannerImageView.image is nil here strongSelf.bannerTextLabel.attributedText = strongViewModel.bannerAttributedStringForImage(image) } } }
Hey, duplicate question here https://github.com/kean/Nuke/issues/89
P.S. I guess I should clarify this behaviour a bit more.
SWIFT 3 func loadImage(with request: Request, into target: AnyObject, handler: @escaping Manager.Handler)
Do not set image to 'into' image view: code example