Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

naphatkrit

macrumors member
Original poster
Jul 18, 2011
38
0
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.
 
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.
 
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?
 
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?

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.