I would like to create a custom UITextView with the ability to enter text in it, as well as programmatically adding some UILabels there that would act like text (I need to delete them with the ‘backspace’ button when the cursor comes near them).
This UITextView should be expandable and the labels can have different width.
Any ideas of how you can create this sort of thing, any tutorials or such?
you can create textfield using this code.
And for creating label you can use this code:
and for deleting label when backspace tape use this method:
If the backspace button is pressed, then the replacementString(string) will have null value. So we can identify backspace button press using this.