INNER CODE UNIT · Swift

onProgressHandler

duguyihou/react-native-turbo-image · ios/TurboImageView.swift:410

  func onProgressHandler(with progress: ImageTask.Progress) {
    let payload = [
      Constants.completed: progress.completed,
      Constants.total: progress.total
    ]
    
    onProgress?(payload)
  }
  
  func onSuccessHandler(with response: ImageResponse) {
    let payload = [
      Constants.width: response.image.size.width,
      Constants.height: response.image.size.height,
      Constants.source: response.request.url?.absoluteString ?? ""
    ] as [String : Any]
    
    onSuccess?(payload)
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…