Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7195

Xcode 5 resignFirstResponder crash

$
0
0

he scope is to have my keyboard dismissed when I press the addFirstOption related button.

This IBAction is a UIButton call in MainViewController. firstOption is a property IBOutlet UITextField.

The runtime crashes when it reaches [self.firstOption resignFirstResponder].I tried [self.firstOption isFirstResponder] and [self.firstOption canResignFirstResponder] for a crosscheck and in both care I get a BOOL YES which make sense...

I did very similar and more simple code with the same input and resignFirstResponder and they all worked.

- (IBAction)addFirstOption:(UIButton *)sender {    NSString *firstOptionName = [[self firstOption]text];    Option *userOption1 = [[Option alloc]init];    userOption1.name = firstOptionName;    [self.firstOption resignFirstResponder];}

Viewing all articles
Browse latest Browse all 7195

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>