There are two ways to solve this problem: 1. Find a third party 2. Add a layer of UIlabel to the textview yourself and then implement the textview's delegate. Once the question is entered, hide the uilabel No input or the number of characters entered is 0 Just show. There is also a way to add a gesture tap to UILable and then detect whether input is needed to achieve the function you want
Is it possible to use the model to define the displayed placeholder text? When using cellForRow, take out the placeholder and assign it to the TextView.
There are two ways to solve this problem:
1. Find a third party
2. Add a layer of UIlabel to the textview yourself and then implement the textview's delegate. Once the question is entered, hide the uilabel
No input or the number of characters entered is 0 Just show. There is also a way to add a gesture tap to UILable and then detect whether input is needed to achieve the function you want
Mainly
Big move: I wrote a temp. I will imitate your interface at night and correct it. The logic is complete
Link description
Is it possible to use the model to define the displayed placeholder text? When using cellForRow, take out the placeholder and assign it to the TextView.
And the most important thing is that an area of the project can be increased infinitely
Why is it necessary to have TextView? TextFiled can’t meet your needs?
Don’t directly manipulate the view, manipulate the data, just refresh it