How to do this??

Discussion in 'iPhone/iPad Programming' started by arnieterm, Feb 18, 2009.

  1. macrumors regular

    Joined:
    Aug 28, 2008
    #1
    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
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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. thread starter macrumors regular

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

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #4
    Code:
    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
     

Share This Page