Shiva
Shiva

Reputation: 575

how to customize uitextfield appearance

I want to customize the UItextbox

I want to get rid of the rounded corners and just keep a bottom line.

If I could have a my own color for the bottom line then it'd be good enter image description here

But I am unable to find a way to do this

Upvotes: 0

Views: 689

Answers (1)

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.

enter image description here

Upvotes: 1

Related Questions