Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import UIKit
/// Syntax Swift 2.2
extension UIAlertController {
class func showIndicatorAlert(viewController: UIViewController, message: String) {
let alert: UIAlertController = self.init(title: nil, message: message, preferredStyle: .Alert)
// Add Indicator
let indicator = UIActivityIndicatorView(activityIndicatorStyle: .Gray) = CGPoint(x: 25, y: 30)
dispatch_async(dispatch_get_main_queue(), {
viewController.presentViewController(alert, animated: true, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment