He Yifei 何一非
He Yifei 何一非

Reputation: 2642

How can I use table view cells to edit text just like the settings app does?

As we know, the settings app has some text editing properties in table view cells. I want to know how can we make such cells in our own app using Swift? Thanks!

Example

Upvotes: 2

Views: 713

Answers (2)

He Yifei 何一非
He Yifei 何一非

Reputation: 2642

Well, I just decided to use custom cell with a Label and a Text Field (no border) at last :)

My solution

Upvotes: 0

Andrea
Andrea

Reputation: 26385

The easier way is create a static grouped table view using storyboard with a text field in each cell.
When I did something like that as approach I decided to switch the input text field delegate in the -didSelectRowAtIndexPath: method by querying the cell and set the text field as a first responder.
Fortunately I've found that on github, there are some third party lib that makes even easier to create forms. Check here.

Upvotes: 2

Related Questions