Reputation: 2207
I checked out iPhone: How can I make a UITextField invisible but still clickable?, but the OP has something else going on and the answers didn't seem to help me out of my fix.
I have a UITextField in which the user has to enter text. Instead of the standard UITextField graphic, I want to use a lovely graphic that's been designed for that purpose. The user would still need to be able to enter text and see the text s/he's entering, but I need the textfield to be invisible so that the graphic can show from underneath it.
How can I do this? Or is there another way to do what I'm after?
Upvotes: 2
Views: 1156
Reputation: 5936
Easiest option is to do it in interface builder. Choose the first uitext field style with no border and that's it.
Upvotes: 1
Reputation: 3467
Another solution would be hiding the UITextView
itself and just adding a transparent button that will call the keyboard to display.
Otherwise, the other answers should work.
Upvotes: 2
Reputation: 23278
Adding my comment as an answer. You can try this,
[textField setBackgroundColor:[UIColor clearColor]];
And then set the border style as UITextBorderStyleNone
.
Upvotes: 3
Reputation: 18865
something like:
yourTextField.borderStyle = UITextBorderStyleNone;
should do it
Upvotes: 2