修訂 | 519ff04cd58ee488a95252431d4c9e8a00028b6f (tree) |
---|---|
時間 | 2012-04-11 22:25:12 |
作者 | Hirami <tomohisa.hirami@nift...> |
Commiter | Hirami |
Resign forcus on SinglePasswordDialog.
@@ -28,12 +28,12 @@ | ||
28 | 28 | |
29 | 29 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { |
30 | 30 | finished = YES; |
31 | + UITextField *field = [self textFieldAtIndex:0]; | |
31 | 32 | if (buttonIndex == 0) { |
32 | 33 | // Cancel |
33 | 34 | self.password = nil; |
34 | 35 | } else if (buttonIndex == 1) { |
35 | 36 | // OK |
36 | - UITextField *field = [self textFieldAtIndex:0]; | |
37 | 37 | NSString *pw = [field.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; |
38 | 38 | if (pw.length == 0) { |
39 | 39 | self.password = nil; |
@@ -41,6 +41,7 @@ | ||
41 | 41 | self.password = pw; |
42 | 42 | } |
43 | 43 | } |
44 | + [field resignFirstResponder]; | |
44 | 45 | } |
45 | 46 | |
46 | 47 | @end |