INNER CODE UNIT · Swift

onSuccessHandler

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

  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)
  }
  
  func onFailureHandler(with error: Error) {
    let payload = [
      Constants.error: error.localizedDescription,
    ]
    
    onFailure?(payload)
  }
  

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…