Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Beginning iOS5 Development.pdf
Скачиваний:
7
Добавлен:
09.05.2015
Размер:
15.6 Mб
Скачать

414

CHAPTER 12: Application Settings and User Defaults

Figure 12–8. Setting some preferences directly in our application

Let’s get started building AppSettings, shall we?

Creating the Project

In Xcode, press N or select File New New Project…. When the new project assistant comes up, select Application from under the iOS heading in the left pane, click the Utility Application icon, and click Next. On the next screen, name your project

AppSettings. Set Device Family to iPhone. Next, check that the Use Storyboard and Use Automatic Reference Counting checkboxes are checked, and that the Use Core Data and Include Unit Tests checkboxes are unchecked, and then click the Next button. Finally, choose a location for your project and click Create.

We haven’t used this particular project template before, so let’s take a quick look at the project before we proceed. The Utililty Application template creates an application similar to the multiview application we built in Chapter 6. The application has a main view and a secondary view called the flipside view. Tapping the information button on the main view takes you to the flipside view, and tapping the Done button on the flipside view takes you back to the main view.

It takes several controllers and views to implement this type of application. All of these are provided, as stubs, by the template. Expand the AppSettings folder, where you’ll find

www.it-ebooks.info

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]