In my iPhone app, I ran into some issues related to showing the keyboard / hiding the keyboard.
I have three text fields; when I click on the third text box, I want to display the UIPickerView and hide the keyboard for this text box. I can do it.
Now the problem is that if the keyboard of the first or second text field is visible, and I click on the third text field, the collector becomes visible, but it appears behind the keyboard (it is located only behind the keyboard the first or second text field).
So, what should I do to make the assembler visible by itself and not display the keyboard on it?
Here is the code: -
- (void) textFieldDidBeginEditing: (UITextField *) textField {
if (textField==thirdTextField) { [scroll setFrame:CGRectMake(00, 48, 320, 160)]; [scroll setContentSize:CGSizeMake(320,335)]; [picker setHidden:NO]; [tool1 setFrame:CGRectMake(0,180,320,44)]; [tool1 setHidden:NO]; [self.picker reloadAllComponents]; [firtTextField resignFirstResponder]; [secondTextField resignFirstResponder]; [thirdTextField resignFirstResponder]; } else { [scroll setFrame:CGRectMake(00, 48, 320, 200)]; [scroll setContentSize:CGSizeMake(320,335)]; [tool1 setHidden:NO]; [tool1 setFrame:CGRectMake(0,220,320,44)]; } }
the problem is similar to

source share