Nuke Documentation

Protocol Data​Loading

public protocol DataLoading  

Fetches original image data.

DataLoading DataLoading DataLoader DataLoader DataLoader->DataLoading

Types Conforming to Data​Loading

DataLoader

Provides basic networking using URLSession.

Requirements

load​Data(with:​did​Receive​Data:​completion:​)

func loadData(with request: URLRequest,
                  didReceiveData: @escaping (Data, URLResponse) -> Void,
                  completion: @escaping (Error?) -> Void) -> Cancellable
  • parameter didReceiveData: Can be called multiple times if streaming is supported.
  • parameter completion: Must be called once after all (or none in case of an error) didReceiveData closures have been called.