tailieunhanh - Lập trình ứng dụng cho iPhone part 16

Data: actions, preferences, files, SQLite, and addresses Trong phần 3 của cuốn sách này, chúng tôi cung cấp một hướng dẫn về các tính năng quan trọng nhất của SDK: chúng tôi vạch ra Mục tiêu-C và hệ điều hành iPhone, chúng tôi khám phá ra hai công cụ chính, Xcode và Giao diện Builder, chúng tôi kiểm tra xem bộ điều khiển của tất cả các loại; và chúng tôi đã xem xét các sự kiện tiêu chuẩn và các mô hình hành động cho iPhone. Trong quá trình này, chúng tôi đã cố gắng để cung cấp nền tảng. | Data actions preferences files SQLite and addresses This chapter covers Accepting user input through controls Allowing user choice through preferences Accessing and creating files Using the SQLite library Manipulating the Address Book In part 3 of this book we offered a tutorial on the most important features of the SDK we outlined Objective-C and the iPhone OS we explored the two main tools Xcode and Interface Builder we examined view controllers of all types and we looked at the standard event and action models for the iPhone. In the process we tried to provide the strong foundation that you need to do any type of iPhone programming. Armed with that knowledge and with the extensive documentation available online or as part of Xcode you should be able to start programming right away. 285 286 Chapter 16 Data actions preferences files SQLite and addresses But we also want to offer you some additional information on many of the SDK s best features that s the purpose of the fourth and final part of this book. In these five chapters we re going to touch upon five major categories of SDK tools and show you how to use them. In the process we re going to go over some ground covered by Apple in its own documentation for each of these tools. As usual we re going to add value by approaching things in a tutorial manner and by offering specific examples of how each of the tools can be used in a real program. We ll also be expanding on our sample programs a bit. Having completed the introduction to SDK we can take advantage of your knowledge of Objective-C to incorporate at least one in-depth example in each chapter our intent is to show how different objects can work together to create a more complex Objective-C project. We can t give you full iPhone App Store programs because of the breadth of what we re covering here but expect to see some code examples that are more than a page long and which typically include some off-topic elements. This chapter will kick off our look at