Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Chapter 1: Here We Go Round Again
What This Book Is
What You Need To Know
What You Need Before You Can Begin
What’s In this Book
Chapter 2: Core Data: What, Why, and How
A Brief History of Core Data
Creating a Core Data Application
Core Data Concepts and Terminology
The Data Model
Managed Objects
Key-Value Coding
Managed Object Context
Putting Everything in Context
Chapter 3: A Super Start: Adding, Displaying, and Deleting Data
Setting up the Xcode Project
Adding a Scene
Scenes and Segues
Storyboard Document Outline
Application Architecture
Designing the View Controller Interface
Creating HeroListController
Making the Connections and Outlets
Navigation Bar Buttons
Tab Bar and User Defaults
Designing the Data Model
Adding an Entity
Editing the New Entity
Adding Attributes to the Hero Entity
Declaring the Fetched Results Controller
Implementing the Fetched Results Controller
Fetched Results Controller Delegate Methods
Making All Work
Error Handling
Implementing Edit and Add
Coding the Table View Data Source and Delegate
Sorting the Table View
Loading the Fetch Request At Launch
Let ‘Er Rip
Done, but Not Done
Chapter 4: The Devil in the Detail View
View Implementation Choices
Creating the Detail View Controller
Wiring Up the Segue
HeroDetailController
Detail View Challenges
Controlling the Table Structure with Property Lists
Property Lists Explained
Modeling Table Structure with a Property List
Defining the Table View via Property List
Parsing the Property List
Pushing the Details
Showing the Details
Editing the Details
Editing Mode in the Detail View
Creating a Custom UITableViewCell Subclass
Saving Your Changes
Specialized Input Views
DatePicker SuperDBEditCell Subclass
Using the DatePicker SuperDBEditCell Subclass
Implementing a Selection Picker
Devil’s End
Chapter 5: Preparing for Change: Migrations and Versioning
About Data Models
Data Models Are Compiled
Data Models Can Have Multiple Versions
Creating a New Data Model Version
The Current Data Model Version
Data Model Version Identifiers
Migrations
Lightweight vs. Standard
Standard Migrations
Setting Up Your App to Use Lightweight Migrations
Time to Migrate On
Chapter 6: Custom Managed Objects
Updating the Data Model
Adding the Age Attribute
Adding the Favorite Color Attribute
Adding a Minimum Length to the Name Attribute
Creating the Hero Class
Tweaking the Hero Header
Defaulting
Validation
Single-Attribute Validations
nil vs. NULL
Multiple-Attribute Validations
Virtual Accessors
Adding Validation Feedback
Updating the Detail View
Refactoring SuperDBEditCell
Xcode Refactoring Options
Moving Code Around
Editable Property
Creating a Color Table View Cell
Custom Color Editor
Custom Color Table View Cell
Cleaning up the Picker
One More Thing
Color Us Gone
Chapter 7: Relationships, Fetched Properties and Expressions
Expanding Your Application: Superpowers and Reports
Relationships
To-One Relationships
To-Many Relationships
Inverse Relationships
Fetched Properties
Creating Relationships and Fetched Properties in the Data Model Editor
Delete Rules
Expressions and Aggregates
Adding the Power Entity
Creating the Powers Relationship
Creating the Inverse Relationship
Creating the olderHeroes Fetched Property
What is a Predicate?
Creating the youngerHeroes Fetched Property
Creating the sameSexHeroes Fetched Property
Creating the oppositeSexHeroes Fetched Property
Adding Relationships and Fetched Properties to the Hero Class
Updating the Detail View
Rethinking Configuration
Encapsulation and Information Hiding
Data-Driven Configuration
Adding Powers
Refactoring the Detail View Controller
Renaming the Configuration Class
Refactoring the Detail Controller
Refactoring the Hero Instance Variable
A Little More Abstraction
A New HeroDetailController
The Power View Controller
Navigating to the PowerViewController
Fetch Properties
Wonderful to the Core
Chapter 8: Behind Every iCloud
Data Storage with iCloud
iCloud Basics
iCloud Backup
Enabling iCloud in Your Application
Key-Value Data Storage
Document Storage
UIDocument
UIDocument with iCloud
NSMetadataQuery
Core Data with iCloud
Enhancing SuperDB
Entitlements
Creating an iCloud enabled Provisioning Profile
Updating the Persistent Store
Updating the Managed Object Context
Updating the UI on DataChanged
Testing the Data Store
Keep Your Feet on the Ground
Chapter 9: Peer-to-Peer Over Bluetooth Using Game Kit
Game Center
Peer-to-Peer Connectivity
In Game Voice
This Chapter’s Application
Network Communication Models
Client–server Model
Peer-to-Peer Model
Hybrid Client–server/Peer-to-Peer
The Game Kit Session
Creating the Session
Finding and Connecting to Other Sessions
Listening for Other Sessions
Sending Data to a Peer
Packaging Up Information to Send
Receiving Data from a Peer
Closing Connections
The Peer Picker
Creating the Peer Picker
Handling a Peer Connection
Creating the Session
Creating the Project
Turning Off the Idle Timer
Importing the Game Kit Framework
Designing the Interface
Defining Application Constants
Designing the Game Board
Creating the Packet Object
Setting Up the View Controller Header
Trying It Out
Game On!
Chapter 10: Map Kit
This Chapter’s Application
Overview and Terminology
The Map View
Map Types
User Location
Coordinate Regions
Setting the Region to Display
The Map View Delegate
Annotations
The Annotation Object
The Annotation View
Adding and Removing Annotations
Selecting Annotations
Providing the Map View with Annotation Views
Geocoding and Reverse Geocoding
Building the MapMe Application
Linking the Map Kit and Core Location Frameworks
Building the Interface
Finishing the View Controller Interface
Writing the Annotation Object Class
Implementing the MapMe ViewController
Go East, Young Programmer
Chapter 11: Messaging: Mail, SMS, and Social Media
This Chapter’s Application
The MessageUI Framework
Creating the Mail Compose View Controller
Populating the Subject Line
Populating Recipients
Setting the Message Body
Adding Attachments
Presenting the Mail Compose View
The Mail Compose View Controller Delegate Method
Message Compose View Controller
The Social Framework
SLComposeViewController
SLRequest
The Activity View Controller
Building the MessageImage Application
Building the User Interface
Taking the Picture
Calling the Camera
Picking the Message Sender
Mailing It In
Chapter 12: Media Library Access and Playback
The MediaPlayer Framework
Media Items
Media Item Collections
Media Queries and Media Property Predicates
The Media Picker Controller
The Music Player Controller
Simple Music Player
Building the SimplePlayer Application
Building the User Interface
Declaring Outlets and Actions
MPMoviePlayerController
MPMediaPlayer
AVFoundation
AVMediaPlayer
Avast! Rough Waters Ahead!
Chapter 13: Locking It Down: iOS Security
Security Considerations
Security Techniques
Encryption
Hashing
Certificates and Signatures
Identity
Security in iOS
Randomization Keychains
Certificates, Keys, and Trust Services
Keychain Viewer Application
Create a Certificate Authority
Creating the Keychain App
Security Never Sleeps
Chapter 14: Keeping Your Interface Responsive
Exploring the Concurrency Problem
Creating the Stalled Application
Designing the Interface
Implementing the Stalled View Controller
Timers
Creating a Timer
Stopping a Timer
Limitations of Timers
Fixing Stalled with a Timer
Creating the Batch Object
Updating the Nib
Updating the View Controller Header
Updating the View Controller Implementation
Operation Queues and Concurrency
Threads
Operations
Operation Queues
Fixing Stalled with an Operation Queue
Creating SquareRootApplication
Custom ProgressCell
Adjusting the User Interface
Changes to ViewController.h
Updating ViewController.m
Queue ’em Up
Chapter 15: Unit Testing, Debugging, and Instruments
Unit Tests
Debugging
Breakpoints
The Debug Navigator
The Debug Area
Trying Out the Debug Controls
The Breakpoint Navigator and Symbolic Breakpoints
Conditional Breakpoints
Breakpoint Actions
Static Analysis
One More Thing About Debugging
Profiling With Instruments
End Of The Road
Chapter 16: The Road Goes Ever On
Getting Unstuck
Apple’s Documentation
Mailing Lists
Discussion Forums
Web Sites
Blogs
And If All Else Fails
Farewell
Index
← Prev
Back
Next →
← Prev
Back
Next →