PDA

View Full Version : How to do this??




arnieterm
Feb 18, 2009, 08:31 AM
For a simple view controller with scroll view, can it be possible that when we tap on textfield, the keyboard that usually slide in from bottom will do so by also moving the view up by the height of the keyboard. I want to do this since I need to make other text fields remain visible when a keyboard for a particular textfield is in position.
Also can it be possible that when we tap a textfield then a picker will open instead of the keyboard because i need to select a value from this picker and displayed in the text field

Thanks
Arnieterm



dejo
Feb 18, 2009, 09:05 AM
For a simple view controller with scroll view, can it be possible that when we tap on textfield, the keyboard that usually slide in from bottom will do so by also moving the view up by the height of the keyboard.
Yes, it's possible. Searching this forum would probably have lead you to this thread:
Newby question; moving up the textfield (http://forums.macrumors.com/showthread.php?p=6990363)

Also can it be possible that when we tap a textfield then a picker will open instead of the keyboard because i need to select a value from this picker and displayed in the text field
The way I've handled this scenario in my a.k.a. app is to disable the textfield (so no keyboard pops up) and then place a drop-down arrow (button) at the end of the textfield to bring up the UIPicker. You can see this on the Fantasy name-type page.

arnieterm
Feb 18, 2009, 09:26 AM
Do I need to override any method so that I can show a picker instead of keyboard when the user taps the textfield?

jnic
Feb 18, 2009, 09:30 AM
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField