O'Reilly logo

Xcode 4 Cookbook by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying and editing text

In this recipe, we will learn how to use text block methods to determine when editing has begun and ended.

Getting ready

In this recipe, we will discuss the usage of the UITextField object and how we can display editable text within it.

How to do it...

In order to see how this can be achieved, we need to modify the ViewObjectsExample application that we created in the previous recipe. Perform the following steps to do so:

  1. Open the ViewObjectsExample.xcodeproj project file.
  2. Select the ViewController.xib file from the project navigator window.
  3. From Object Library, drag a TextField object onto the subview and place it underneath UIButton we added previously.
  4. Resize the TextField control width so that it is big enough to hold enough ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required