ClipShareDelegate
Delegate providing results for the ClipShareViewController
-
Called when the underlying clip for the provided SportEventSnapResultEntry failed loading. This is a terminal state and you should most likely dismiss the ClipShareViewController and navigate back to Snap UI or some other screen of your application. Note: You are responsible for handling navigation away from the ClipShareViewController.
- viewController the ClipShareViewController
-
Called when the underlying clip for the provided snap result was loaded but the clip is too short. The user can try snapping again after a short period if the available clip is longer. This is a terminal state and you should most likely dismiss the ClipShareViewController and navigate back to Snap UI or some other screen of your application. Note: You are responsible for handling navigation away from the ClipShareViewController.
- viewController the ClipShareViewController
-
Called when the trimmed clip could not be created for some reason. This is not a terminal state and the user could try again. Decide on your own if you want to dismiss the ClipShareViewController on your own.
Note: You are responsible for handling navigation away from the ClipShareViewController.
- viewController the ClipShareViewController
-
Called when the user finished trimming a clip and the clip was created. This is not a terminal state and the user can continue to trim another clip if desired. You should decide on your own if you want to dismiss the ClipShareViewController in this case or give the user some indication that the clip was created.
Please not that during clip creation (which happens asynchronously) a loading indicator is shown in the Save Clip Button. If you want to keep the ClipShareViewController open after clip creation, you need to call dismissLoadingIndicatorInSaveClipButton on the ClipShareViewController in order to dismiss the loading indicator and reenable the button.
Note: You are responsible for handling navigation away from the ClipShareViewController.
- viewController the ClipShareViewController
- clip the created clip
-
Called when ClipShare has loaded the snap information and wants to trigger prefetching of images. Should return a prefetchToken or another disable object that causes prefetching to stop when it is deallocated
imageURLs the image URLs to prefetch
-
Called when the given image URL should be loaded in the given UIImageView
- url the URL to load
- imageView the UIImageView to load that image in
- completion optional completion block in case ClipShare is interested in whether image load was successfully finished or not
-
Called when any optional previous image loading in the given UIImageView should be cancelled
- imageView the UIImageView to cancel image loading in