Implementing the Find Controller

For your geocoding functionality to work, you’re going to need to do several things in the Find controller. Most of what you need to do revolves around getting the text the user enters. You’ll also have to have the text geocoded and have the geocoded location implemented as an Annotation by the Trip model object, which the Find controller will then add to the map.

Getting the text

In Chapter 14, you format the Find cell with a label and a Text field. In this chapter, you set things up so that the Master View controller can get the text a user enters and pass it on to the Find controller to, well, find.

To access the text, you first need to create an outlet for the Text field:

1. Select MainStoryboard in the Project navigator.

2. Select the Master View Controller in the Document Outline.

9781118231333-ma002.tif 3. Select the Assistant in the Editor selector, and if the RTMasterView Controller.h file doesn’t appear, navigate to it using the Jump bar.

4. In the Document Outline, open the disclosure triangle for the second Table View Section in the Master View Controller – Master Scene – to get to the Table View cell holding the Find label and text.

5. Open that cell’s disclosure triangle to display the Text Field, then drag from the Text field to the Master View Controller interface (in the Assistant editor) between the @interface and @end compiler directives, and add ...

Get iPad Application Development For Dummies, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.