Revisions
-
yume190 revised this gist
Jun 19, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,17 +2,17 @@ UIAlertController* __weak weakAlert = changeAlert; UIAlertAction *alertActionOk = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { UITextField *t = [[weakAlert textFields] firstObject]; DLog(@"%@",t.text); [weakAlert dismissViewControllerAnimated:YES completion:nil]; }]; UIAlertAction *alertActionCancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { DLog(@"%@",action); }]; UIAlertAction *alertActionTest = [UIAlertAction actionWithTitle:@"Test" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { UITextField *t = [[weakAlert textFields] firstObject]; DLog(@"%@",t.text); [weakAlert dismissViewControllerAnimated:YES completion:nil]; }]; [weakAlert addAction:alertActionOk]; -
yume190 renamed this gist
Jun 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
yume190 renamed this gist
Jun 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
yume190 created this gist
Jun 19, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ changeAlert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController* __weak weakAlert = changeAlert; UIAlertAction *alertActionOk = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { [weakAlert dismissViewControllerAnimated:YES completion:nil]; UITextField *t = [[weakAlert textFields] firstObject]; DLog(@"%@",t.text); }]; UIAlertAction *alertActionCancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { DLog(@"%@",action); }]; UIAlertAction *alertActionTest = [UIAlertAction actionWithTitle:@"Test" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [weakAlert dismissViewControllerAnimated:YES completion:nil]; UITextField *t = [[weakAlert textFields] firstObject]; DLog(@"%@",t.text); }]; [weakAlert addAction:alertActionOk]; [weakAlert addAction:alertActionCancel]; [weakAlert addAction:alertActionTest]; [weakAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) { textField.placeholder = @"pls"; }]; [self.viewController presentViewController:weakAlert animated:YES completion:nil]