I found out the answer was completely unrelated to the title of the question with the solution being that, as the app works in ios 6 and 7 I had some title which only worked in ios 7 and when it opened the ad it crashed because of this.
App crashes when moving quickly between textfields
-
15-06-2023 - |
質問
I have a list of textfields which when you press the return button it goes to the next one until it gets to the one when it gets rid of the keyboard. This all works fine for me though when I go through the list really quickly the app crashes and I get this error:
*** Assertion failure in NSDictionary *_UIRecordArgumentOfInvocationAtIndex(NSInvocation *, NSUInteger, BOOL)(), /SourceCache/UIKit/UIKit-2380.17/UIAppearance.m:1118
Here is the code which I use to switch between textfields:
-(BOOL) textFieldShouldReturn:(UITextField *)textField {
if (textFieldNo == i) {
[textField resignFirstResponder];
} else {
[[self.view viewWithTag:textFieldNo + 1] becomeFirstResponder];
}
return NO;
}
Please can I have some advice on how to sort this issue
Thanks in advance
Edit
It turns out it wasn't me going through the textfields quickly which was causing the error in fact it was that when I resigned it I accidentally pressed the ad beneath. This has is only a recent issue and I am curious to find out why this behaviour is taking place
解決 2
他のヒント
Try returning YES
after resigning:
-(BOOL) textFieldShouldReturn:(UITextField *)textField {
if (textFieldNo == i) {
[textField resignFirstResponder];
} else {
[[self.view viewWithTag:textFieldNo + 1] becomeFirstResponder];
}
return YES;
}
所属していません StackOverflow