-
-
Save laevandus/7b72930bb6c026a014ef48493ea76edb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class ImageBatchLoader { | |
weak var delegate: ImageBatchLoaderDelegate? | |
init(delegate: ImageBatchLoaderDelegate) { | |
self.delegate = delegate | |
} | |
func start() { | |
DispatchQueue.global().async { | |
self.delegate?.imageLoader(self, didLoadBatch: [UIImage()]) | |
} | |
} | |
} | |
protocol ImageBatchLoaderDelegate: AnyObject { | |
func imageLoader(_ imageLoader: ImageBatchLoader, didLoadBatch batch: [UIImage]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment