I have an app in the App Store compiled for 4.2 that runs odd when running under iOS 5.0. I traced it to resignFirstResponder , which was called twice under iOS 5.0, while it was called once under iOS 4.2 and 4.3.
I have a derived class from UITextField where I override resignFirstResponder . See the sample code below.
In iOS 4.2 and 4.3, I see the following in the console:
textFieldShouldReturn resignFirstResponder textFieldDidEndEditing
In iOS 5.0, I see the following on the console:
textFieldShouldReturn resignFirstResponder resignFirstResponder textFieldDidEndEditing
Running code on the device and the simulator gives consistent results. Am I missing something or is this a mistake?
IOS 5.0 stack trace
#0 -[BugTextField resignFirstResponder] (self=0x681b530, _cmd=0x3769b41) at /Users/.../BugTextField.m:14
BugTextField.h
BugTextField.m
#import "BugTextField.h" @implementation BugTextField - (BOOL) resignFirstResponder { NSLog(@"resignFirstResponder"); return [super resignFirstResponder]; } @end
BugTextFieldVC.h
BugTextFieldVC.m
#import "BugTextFieldVC.h" #import "BugTextField.h" @implementation BugTextFieldVC - (id) init { if ( !(self = [super init]) ) { return self; }
mmorris
source share