Note that there are some explanatory texts on larger screens.

plurals
  1. POUITextField will not accept input from the keyboard for IOS6
    text
    copied!<p>I have narrowed this down to only IOS6 devices. </p> <p><strong>Original Question:</strong></p> <p>I have searched everywhere and tried everything and I simply cannot figure this out!</p> <p>I have a <code>UITextField</code>. When it is selected, the keyboard slides up and the curser begins blinking on the textfield. When I tap the buttons on the keyboard everything behaves normally, the key responds and the curser stops blinking as it should. The only thing is that text is not put into the textfield! It does however accept input from the emoji keyboard. Any help will be very much appreciated!</p> <p>This is how the <code>UITextField</code> is created:</p> <pre><code>UITextField *userInput = [[UITextField alloc] initWithFrame:CGRectMake(10, yPos, controlWidth, 26)]; yPos += 32; [userInput setText:[prompt defaultValue]]; [userInput setPlaceholder:[prompt helpText]]; [userInput setBorderStyle:UITextBorderStyleRoundedRect]; [userInput setClearButtonMode:UITextFieldViewModeWhileEditing]; [userInput setFont:[UIFont fontWithName:@"Helvetica" size:18]]; [userInput setAdjustsFontSizeToFitWidth:YES]; [userInput setMinimumFontSize:10]; [userInput setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; [userInput setDelegate:self]; [self.scrollView addSubview:userInput]; [self.promptControls addObject:userInput]; [userInput release]; </code></pre> <p>This is in a for loop so the number of <code>UITextField</code>s depends on how many times the loop is called.</p> <p>These are the delegate methods I use:</p> <pre><code>- (void)textFieldDidBeginEditing:(UITextField *)aTextField { self.activeField = aTextField; } - (void)textFieldDidEndEditing:(UITextField *)aTextField { self.activeField = nil; } - (BOOL)textFieldShouldReturn:(UITextField *)aTextField { [aTextField resignFirstResponder]; return YES; } </code></pre> <p><code>activeField</code> is a property on the view controller just to determine which field is currently active</p> <p>I believe that is all the relevant code</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload