Skip to content

Instantly share code, notes, and snippets.

@bilogub
Created December 17, 2015 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilogub/69b48123ec4e0f2d06d8 to your computer and use it in GitHub Desktop.
Save bilogub/69b48123ec4e0f2d06d8 to your computer and use it in GitHub Desktop.
Show Alert message in iOS
let errorMessageCtrl = UIAlertController(title: "Location Services Disabled",
message: "To operate this application needs Location Services enabled on your device." +
"\nPlease change configuration in Settings menu accordingly.\nThank you", preferredStyle: .Alert)
let alertAction = UIAlertAction(title: "OK", style: .Default, handler: nil)
errorMessageCtrl.addAction(alertAction)
navigationController?.presentViewController(errorMessageCtrl, animated: true, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment