How to make an editable shortcut in iOS (for example, name a list of reminders)?

You know how in Reminders the name of the list does not look like a text field, it looks like a shortcut (which makes it damn confusing, in my opinion, but it doesn’t matter), but can you edit it?

I would like to do the same in my application - either have a shortcut that you can edit, or a text box that looks like a shortcut. Is there a function for this, or do you need to do something when touching the label creates a text field that disappears later (and updates the label text)?

Do not worry, by the way, this will not be as confusing in my application as in Reminders.

+4
source share
2 answers

. , borderStyle , layer.

+8

: -

UITextField *field = [[UITextField alloc] initWithFrame:fieldFrame];
[field setBorderStyle:UITextBorderStyleNone];
[field setText:@"Editable field..."];
[field setDelegate:self];
[self.view addSubview:field];
0

Source: https://habr.com/ru/post/1536075/


All Articles