If LightWork successfully saved the image to the Photos library, we want to show the user another alert with sharing options. The following method checks the availability of various social media platforms and builds an alert with an action button for each available platform. Despite targeting different social media platforms, the action buttons are similar to each other, so we build them in a helper method, shareImageActionWithTitle:serviceType:image:
. We also provide a Do not share action button that does nothing except stop the app's busy mode:
- (void)showSaveImageSuccessAlertWithImage:(UIImage *)image { // Create a "Saved image" alert. UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Saved image" message:@"The image has been added to your Photos library. Would you like to share it with your friends?" preferredStyle:UIAlertControllerStyleAlert]; // If the user has a Facebook account on this device, add a...