Make the tab key on a BT keyboard stop on a button?

Discussion in 'iOS Programming' started by chrono1081, Aug 7, 2014.

  1. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #1
    Hi guys,

    I have a dilemma and haven't seen it mentioned anywhere online. I have a form and the users of the iPad app I'm making want to tab through this form (the iPads all have keyboard cases) and they want the buttons to be selected by the tab key. Is this even possible?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    The usual way to navigate with the keyboard is with next/previous buttons added to the top of the keyboard. Of course this usually is navigating from one text field to the next. You could possibly have both next/previous and tab navigation, although I don't see the benefit of tab key navigation since the built-in keyboard has no tab key.

    I'm not sure what buttons you mean to be selected. If you mean regular UIButtons you might be able to change the appearance of a button to make it look selected and then do the button's action if the Return key is tapped. UIControls have (I think) three states and buttons only use two of them usually. You can use the third state to change the buttons' appearances. Or you could change the background color or something or add some kind of selection ring around the button to make it appear selected.

    I doubt I've ever seen an app do this but maybe it might be OK. Depending on how it looks there might be some chance that Apple would reject it, but I really have no idea on that.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Yes, but I believe the app's users are using external keyboards:
     

Share This Page