3

How can I display a button and/or activity indicator inside of a UITextField on the iPhone? I'm trying to reproduce Mobile Safari's location text field which contains either a reload button or a cancel (stop loading) button which is right-justified inside of the text field.

Similarly, when you click inside of the text field (not on the cancel/reload buttons) to edit the URL, a clear icon (x inside of a circle) is shown inside of the text field which will erase the contents of the text field.

How can I create this in my own apps? I cannot seem to do it via Interface Builder so I suspect it's being done in code.

1
  • Are you certain this is not just a clever layering of views and limited text field delegate resignation? Commented Aug 20, 2010 at 3:04

2 Answers 2

1

There is a built in option that worked for me...check here:

Adding the "Clear" Button to an iPhone UITextField

Sign up to request clarification or add additional context in comments.

Comments

0

Check out TTMessageController.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.