Answering your question objectively, you need to create a new class extending UITextField, in this way you will define the behaviour what you want. If you do not know how to start I suggest you get some custom UITextField as an example from GITHUB, there are so many there. Observe how to custom and draw things inside the control. When you have an extended UITextFiled class, select the control on your XIB or storyboard and you need just set the base class of control in XCODE as shown in the picture below. I hope it helps you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.