Bhavin Ramani
Bhavin Ramani

Reputation: 3219

set color inside textfield near border

I want to change textfield color not background color but near part of textfield border just like shadow. As shown in image.

enter image description here

Upvotes: 1

Views: 135

Answers (2)

Dhaval Parmar
Dhaval Parmar

Reputation: 46

If you want to add shadow in UITextField as you display in image then the easiest way will be that design image of that UITextField and set it to it UITextField background.

Upvotes: 2

Chetan kasundra
Chetan kasundra

Reputation: 528

IT's so simple just slice that image and put that image in Textfield background. or Use the Code suggest by @Mrug.

textField.layer.cornerRadius=5.0f; 
textField.layer.masksToBounds=YES; 
textField.layer.borderColor=[[UIColor blackColor]CGColor];
textField.layer.borderWidth= 1.5f;

Upvotes: 1

Related Questions