Skip to content

Instantly share code, notes, and snippets.

@aminbenarieb
Last active March 29, 2017 07:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminbenarieb/da5a2ae47e367e05df5fc1ef85c08356 to your computer and use it in GitHub Desktop.
Save aminbenarieb/da5a2ae47e367e05df5fc1ef85c08356 to your computer and use it in GitHub Desktop.
UIAlertController* <#alert#> = [UIAlertController alertControllerWithTitle:<#name#>
message:<#message#>
preferredStyle:<#UIAlertControllerStyleAlert#>];
void (^<#handler#>)(UIAlertAction * action) = ^(UIAlertAction * action){
};
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:<#@"OK"#> style:<#UIAlertActionStyleDefault#>
handler:<#handler#>];
[<#alert#> addAction:<#defaultAction#>];
[self presentViewController:<#alert#> animated:YES completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment