Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

background image TextField doesn´t appear

I have XCode 4.2

In interface builder i´m choosing a background image for my TextField but it just doesn´t appear. I did the same for a custom button and worked great. Don´t know what i´missing.

Dumb question, but i can´t figured it out.

like image 763
bruno Avatar asked Feb 08 '12 22:02

bruno


3 Answers

Possibly one of the following... If the textfield is disabled or if the borderStyle value is set to the UITextBorderStyleRoundedRect style, the custom background image associated with the text field is ignored.

like image 80
damon Avatar answered Sep 18 '22 00:09

damon


The custom background image associated with the text field would be visible.

 self.textfieldName.borderStyle =UITextBorderStyleNone;
like image 39
Aswathy Bose Avatar answered Sep 18 '22 00:09

Aswathy Bose


textfield.borderStyle =UITextBorderStyleNone;

textfield.background=[UIImage imageNamed:@"txt2.jpg"];
like image 32
SURESH SANKE Avatar answered Sep 21 '22 00:09

SURESH SANKE