책 이미지
책 정보
· 분류 : 외국도서 > 컴퓨터 > 소프트웨어 개발/엔지니어링 > 일반
· ISBN : 9781118391846
· 쪽수 : 363쪽
목차
INTRODUCTION xxi PART I: MANIPULATING AND DISPLAYING DATA ON THE IPHONE AND IPAD CHAPTER 1: INTRODUCING DATA-DRIVEN APPLICATIONS 3 Building a Simple Data-Driven Application 4 Creating the Project 4 Adding a UITableView 7 Retrieving Data 9 Implementing Your Data Model Class 9 Displaying the Data 12 Further Exploration 18 Design Patterns 18 Reading a Text File 18 Moving Forward 19 CHAPTER 2: THE IOS DATABASE: SQLITE 21 What Is SQLite? 22 The SQLite Library 22 SQLite and Core Data 23 Building a Simple Database 24 Designing the Database 25 Creating the Database 27 Populating the Database 29 Tools to Visualize the SQLite Database 33 Connecting to Your Database 36 Starting the Project 36 The Model Class 39 The DBAccess Class 40 Parameterized Queries 49 Writing to the Database 50 Displaying the Catalog 51 Viewing Product Details 53 Moving Forward 56 CHAPTER 3: DISPLAYING YOUR DATA: THE UITABLEVIEW 57 Customizing the Table View 58 Table View Cell Styles 58 Adding Subviews to the contentView 61 Subclassing UITableViewCell 65 Implementing Sections and an Index 70 Implementing Search 76 Optimizing Table View Performance 82 Reusing Existing Cells 82 Opaque Subviews 83 Custom Drawn Cells with drawRect 85 UI Conventions for Accessory Views 86 Moving Forward 86 CHAPTER 4: USER INTERFACE ELEMENTS 87 Building Your Interface with Storyboards 88 Starting the Storyboard Example Application 89 Adding the Sub-detail Screen to the Storyboard 90 Adding a Modal Screen to the Storyboard 91 Displaying Master/Detail Data with the Split View Controller 92 Introducing the UISplitViewController 93 The UISplitViewControllerDelegate Protocol 95 Starting the Split View Sample Application 95 Building the Detail Interface 98 Adding Surveys with the Master/Detail View 100 Displaying Data in a Popover 105 Building the InfoViewController 106 Displaying the UIPopoverController 108 Gesture Recognizers 109 The UIGestureRecognizer Class 109 Using Gesture Recognizers 110 File Sharing Support 114 Enable File Sharing in the Sample Application 114 Serializing the Survey Data Array 114 Deserializing and Loading the Survey Data Array 116 Sharing the Data 117 Moving Forward 119 II: MANAGING YOUR DATA WITH CORE DATA CHAPTER 5: INTRODUCING CORE DATA 123 The Basics of Core Data 124 The Core Data Architecture 125 The Core Data Stack 125 SQLite and Core Data 127 Core Data and iCloud 127 Data Protection 128 Using Core Data: A Simple Task Manager 129 Creating the Project 129 Examining the Template Code 130 Modifying the Template Code 142 Moving Forward 147 CHAPTER 6: MODELING DATA IN XCODE 149 Modeling Your Data 150 Defi ning Entities and Their Attributes 151 Adding Relationships Between Entities 155 Creating Fetched Properties and Fetch Request Templates 158 Creating Custom NSManagedObject Subclasses 161 Implementing Validation Rules 163 Implementing Default Values 164 Creating the Tasks Model 165 Moving Forward 167 CHAPTER 7: BUILDING A CORE DATA APPLICATION 169 The Tasks Application Architecture 170 The Data Model 170 The Class Model 170 The User Interface 171 Coding the Application 172 MasterViewController and the Basic UI 173 Generating the Managed Object Subclasses 176 Adding and Viewing Tasks 177 Building the ViewTaskController 177 Changes to the MasterViewController 182 Building the Editing Controllers 184 Editing Text with the EditTextViewController 185 Setting Priorities with the EditPriorityViewController 189 Adding and Editing Locations with the EditLocationViewController 193 Modifying Dates with the EditDateController 199 Finishing Up the Editing Controllers 203 Displaying Results in the MasterViewController 206 Sorting Results with NSSortDescriptor 20