Insert tableview similar to the Reminders app

Discussion in 'iOS Programming' started by naphatkrit, Dec 9, 2011.

  1. naphatkrit macrumors member

    Joined:
    Jul 18, 2011
    #1
    Hi,
    Does anyone know how to implement an insert method similar to how it's done in Remnders iPad app? When the user click the add button, the text field in the last row becomes the first responder and ask for the user to input the row's text. I would like to implement my table this way rather than the traditional method of having another view appear modally asking the user for information.
     
  2. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #2
    You basically answered your own question. When the user presses the +, stick an extra cell with a text field in it at the bottom of the table view, and make it the first responder.
     
  3. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #3
    Oh, i see. Thanks a lot!

    One more question though...I implemented this in such a way that it adds a row on top. Now, when the row on top is not visible (the view got scrolled down), the textfield refuses to become the first responder, even after i used the scrollRectToVisible method. What could be the problem?
     
  4. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #4
    It depends on how you implemented that extra cell. Normally, cells that are off screen essentially don't exist or are reused for cells that are on screen...this may or may not be your problem depending on how you did it.
     

Share This Page