How to do this??

Discussion in 'iOS Programming' started by arnieterm, Feb 18, 2009.

  1. arnieterm macrumors regular

    Aug 28, 2008
    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

  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Yes, it's possible. Searching this forum would probably have lead you to this thread:
    Newby question; moving up the textfield

    The way I've handled this scenario in my [APP]a.k.a.[/APP] 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.
  3. arnieterm thread starter macrumors regular

    Aug 28, 2008
    Do I need to override any method so that I can show a picker instead of keyboard when the user taps the textfield?
  4. jnic macrumors 6502a

    Oct 24, 2008
    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField

Share This Page