قالب وردپرس درنا توس
Home / IOS Development / Adding labels to UITextView

Adding labels to UITextView



  Adding labels to UITextView "title =" Adding labels to UITextView "/> </td>
<td> <!-- SC_OFF --></p>
<div class=

Hello everyone,

For my project I try to create a custom text view with a tag bubble image below.

https : //github.com/ibireme/YYText

I've already found this project called YYText on Github, but it's written in Objective-C and I'm trying to rewrite it in Swift.

I could replicate something similar by getting the frame of the word and creating a view behind it if the regex matches, but it does not work the same for the following reasons:

The user cannot edit the text of the bubble in YYText, but they can do so in my app. want them not to be able to edit the tag bubbles when added to the text view.

• When you delete the text, the YYText deletes the bubbles one at a time, but my code deletes only one character at a time. below.

What I have e on the left right now.

My question is, how can I do something similar to YYText?

If you want to test my code, here it is. You paste it directly into the playground and drive it.

If there is something you do not understand about my question, please comment below, so I can prepare further. English is not my main language, so please excuse any errors. Thanks in advance.

submitted by / u / givemeausernameidea
[comments]


Source link