Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make an editable label in iOS (like naming a Reminders list)?

You know how in Reminders the name of the list doesn't look like a text field, it looks like a label (which makes it bloody confusing in my opinion, but never mind that), but you can edit it?

I'd like to do the same thing in my app - either have a label you can edit, or a text field that looks like a label. Is there a function for doing that, or would you need to do something where touching the label makes a text field appear, which disappears later (and updates the label text)?

Don't worry, by the way, it won't be as confusing in my app as it is in Reminders.

like image 332
mazz0 Avatar asked Dec 26 '22 10:12

mazz0


1 Answers

Use a text field and make it look like a label. Primarily, change the borderStyle of the view, but you can also make changes to the layer properties.

like image 177
Wain Avatar answered Dec 28 '22 01:12

Wain