こんな感じのようです。
- (void)method:(id)object { // objectがNSStringクラスかどうかを確認 if ([object isKindOfClass:[NSString class]]) { // NSStringクラスの場合 ... }
- (void)method:(id)object { // objectがNSStringクラスかどうかを確認 if ([object isKindOfClass:[NSString class]]) { // NSStringクラスの場合 ... }
- (void)viewDidLoad { UITextField *textField = [[[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 31)] autorelease]; textField.borderStyle = UITextBorderStyleRoundedRect; [textField addTarget:self action:@selector(editingDidEnd:) forControlEvents:UIControlEventEditingDidEndOnExit]; [self.view addSubview:textField]; } - (void)editingDidEnd:(id)sender { UITextField *textField = (UITextField *)sender; [textField resignFirstResponder]; }