Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Programming iOS 5
Preface
Acknowledgments for the First Edition
Notes on the Second Printing
Notes on the Second Edition
I. Language
1. Just Enough C
Compilation, Statements, and Comments
Variable Declaration, Initialization, and Data Types
Structs
Pointers
Arrays
Operators
Flow Control and Conditions
Functions
Pointer Parameters and the Address Operator
Files
The Standard Library
More Preprocessor Directives
Data Type Qualifiers
2. Object-Based Programming
Objects
Messages and Methods
Classes and Instances
Class Methods
Instance Variables
The Object-Based Philosophy
3. Objective-C Objects and Messages
An Instance Reference Is a Pointer
Instance References, Initialization, and nil
Instance References and Assignment
Instance References and Memory Management
Messages and Methods
Sending a Message
Declaring a Method
Nesting Method Calls
No Overloading
Parameter Lists
Unrecognized Selectors
Typecasting and the id Type
Messages as Data Type
C Functions
C Struct Pointers
Blocks
4. Objective-C Classes
Class and Superclass
Interface and Implementation
Header File and Implementation File
Class Methods
The Secret Life of Classes
5. Objective-C Instances
How Instances Are Created
Ready-Made Instances
Instantiation from Scratch
Initialization
The designated initializer
Nib-Based Instantiation
Polymorphism
The Keyword self
The Keyword super
Instance Variables and Accessors
Key–Value Coding
Properties
How to Write an Initializer
II. IDE
6. Anatomy of an Xcode Project
New Project
The Project Window
The Navigator Pane
The Utilities Pane
The Editor
The Project File and Its Dependents
The Target
Build Phases
Build Settings
Configurations
Schemes and Destinations
From Project to App
Build Settings
Property List Settings
Nib Files and Storyboard Files
Other Resources
Code
Frameworks and SDKs
7. Nib Management
A Tour of the Nib-Editing Interface
The Dock
Canvas
Inspectors and Libraries
Nib Loading and File’s Owner
Making and Loading a Nib
Outlet Connections
More Ways to Create Outlets
More About Outlets
Action Connections
Additional Initialization of Nib-Based Instances
8. Documentation
The Documentation Window
Class Documentation Pages
Sample Code
Other Resources
Quick Help
Symbols
Header Files
Internet Resources
9. Life Cycle of a Project
Choosing a Device Architecture
Localization
Editing Your Code
Autocompletion
Snippets
Live Syntax Checking and Fix-it
Navigating Your Code
Debugging
Caveman Debugging
The Xcode Debugger
Static Analyzer
Clean
Running in the Simulator
Running on a Device
Device Management
Version Control
Instruments
Distribution
Ad Hoc Distribution
Final App Preparations
Icons in the App
Other Icons
Launch Images
Screenshots
Property List Settings
Submission to the App Store
III. Cocoa
10. Cocoa Classes
Subclassing
Categories
Splitting a Class
Private Method Declarations
Protocols
Optional Methods
Some Foundation Classes
Useful Structs and Constants
NSString and Friends
NSDate and Friends
NSNumber
NSValue
NSData
Equality and Comparison
NSIndexSet
NSArray and NSMutableArray
NSSet and Friends
NSDictionary and NSMutableDictionary
NSNull
Immutable and Mutable
Property Lists
The Secret Life of NSObject
11. Cocoa Events
Reasons for Events
Subclassing
Notifications
Receiving a Built-In Notification
Unregistering
NSTimer
Delegation
Data Sources
Actions
The Responder Chain
Deferring Responsibility
Nil-Targeted Actions
Application Lifetime Events
Swamped by Events
12. Accessors and Memory Management
Accessors
Key–Value Coding
Memory Management
Principles of Cocoa Memory Management
The Golden Rules of Memory Management
What ARC Is and What It Does
How Cocoa Objects Manage Memory
Autorelease
Memory Management of Instance Variables (Non-ARC)
Memory Management of Instance Variables (ARC)
Retain Cycles and Weak References
Nib Loading and Memory Management
Memory Management of Global Variables
Memory Management of Pointer-to-Void Context Info
Memory Management of CFTypeRefs
Properties
13. Data Communication
Model–View–Controller
Instance Visibility
Visibility by Instantiation
Visibility by Relationship
Global Visibility
Notifications
Key–Value Observing
IV. Views
14. Views
The Window
Subview and Superview
Frame
Bounds and Center
Layout
Transform
Visibility and Opacity
15. Drawing
UIImage and UIImageView
Graphics Contexts
UIImage Drawing
CGImage Drawing
CIFilter and CIImage
Drawing a UIView
Graphics Context Settings
Paths and Drawing
Clipping
Gradients
Colors and Patterns
Graphics Context Transforms
Shadows
Points and Pixels
Content Mode
16. Layers
View and Layer
Layers and Sublayers
Manipulating the Layer Hierarchy
Positioning a Sublayer
CAScrollLayer
Layout of Sublayers
Drawing in a Layer
Content Resizing and Positioning
Layers that Draw Themselves
Transforms
Depth
Shadows, Borders, and More
Layers and Key–Value Coding
17. Animation
Drawing, Animation, and Threading
UIImageView and UIImage Animation
View Animation
Animation Blocks
Modifying an Animation Block
Transition Animations
Block-Based View Animation
Implicit Layer Animation
Animation Transactions
Media Timing Functions
Core Animation
CABasicAnimation and Its Inheritance
Using a CABasicAnimation
Keyframe Animation
Making a Property Animatable
Grouped Animations
Transitions
The Animations List
Actions
What an Action Is
The Action Search
Hooking Into the Action Search
Nonproperty Actions
Emitter Layers
18. Touches
Touch Events and Views
Receiving Touches
Restricting Touches
Interpreting Touches
Gesture Recognizers
Gesture Recognizer Classes
Multiple Gesture Recognizers
Subclassing Gesture Recognizers
Gesture Recognizer Delegate
Touch Delivery
Hit-Testing
Hit-testing for layers
Hit-testing for drawings
Hit-testing during animation
Initial Touch Event Delivery
Gesture Recognizer and View
Touch Exclusion Logic
Recognition
Touches and the Responder Chain
V. Interface
19. View Controllers
The View Controller Hierarchy
View Controller and View Creation
Manual View
Generic Automatic View
View in a Separate Nib
Nib-Instantiated View Controller
Storyboard-Instantiated View Controller
Rotation
Initial Orientation
Rotation Events
Presented View Controller
Presented View Animation
Presentation Styles
Presented Views and Rotation
Tab Bar Controllers
Tab Bar Items
Configuring a Tab Bar Controller
Navigation Controllers
Bar Button Items
Navigation Items
Toolbar Items
Configuring a Navigation Controller
Page View Controller
Container View Controllers
Storyboards
View Controller Lifetime Events
View Controller Memory Management
20. Scroll Views
Creating a Scroll View
Scrolling
Paging
Tiling
Zooming
Zooming Programmatically
Zooming with Detail
Scroll View Delegate
Scroll View Touches
Scroll View Performance
21. Table Views
Table View Cells
Built-In Cell Styles
Custom Cells
Overriding a cell’s subview layout
Adding subviews in code
Designing a cell in a nib
Designing a cell in a storyboard
Table View Data
The Three Big Questions
Table View Sections
Refreshing Table View Data
Variable Row Heights
Table View Selection
Table View Scrolling and Layout
Table View Searching
Table View Editing
Deleting Table Items
Editable Content in Table Items
Inserting Table Items
Rearranging Table Items
Dynamic Table Content
Table View Menus
22. Popovers and Split Views
Configuring and Displaying a Popover
Managing a Popover
Dismissing a Popover
Popover Segues
Automatic Popovers
Split Views
23. Text
UILabel
UITextField
Editing and the Keyboard
Dismissing the keyboard
Keyboard covers text field
Configuring the Keyboard
Text Field Delegate and Control Event Messages
The Text Field Menu
UITextView
Core Text
24. Web Views
Loading Content
Communicating with a Web View
25. Controls and Other Views
UIActivityIndicatorView
UIProgressView
UIPickerView
UISearchBar
UIControl
UISwitch
UIStepper
UIPageControl
UIDatePicker
UISlider
UISegmentedControl
UIButton
Custom Controls
Bars
UINavigationBar
UIToolbar
UITabBar
Appearance Proxy
26. Modal Dialogs
Alert View
Action Sheet
Dialog Alternatives
Local Notifications
VI. Some Frameworks
27. Audio
System Sounds
Audio Session
Audio Player
Remote Control of Your Sound
Playing Sound in the Background
Further Topics in Sound
28. Video
MPMoviePlayerController
MPMoviePlayerViewController
UIVideoEditorController
Further Topics in Video
29. Music Library
Exploring the Music Library
The Music Player
The Music Picker
30. Photo Library
UIImagePickerController
Choosing from the Photo Library
Using the Camera
The Assets Library Framework
31. Address Book
Address Book Database
Address Book Interface
ABPeoplePickerNavigationController
ABPersonViewController
ABNewPersonViewController
ABUnknownPersonViewController
32. Calendar
Calendar Database
Calendar Interface
33. Mail
Mail Message
SMS Message
34. Maps
Presenting a Map
Annotations
Overlays
35. Sensors
Location
Heading and Course
Acceleration
Shake Events
UIAccelerometer
Core Motion
VII. Final Topics
36. Persistent Storage
The Sandbox
Basic File Operations
Saving and Reading Files
User Defaults
File Sharing
Document Types
Handing Off a Document
XML
SQLite
Image File Formats
37. Basic Networking
HTTP Requests
Bonjour
Push Notifications
Beyond Basic Networking
38. Threads
The Main Thread
Why Threading Is Hard
Three Ways of Threading
Manual Threads
NSOperation
Grand Central Dispatch
Threads and App Backgrounding
39. Undo
The Undo Manager
The Undo Interface
The Undo Architecture
40. Epilogue
About the Author
← Prev
Back
Next →
← Prev
Back
Next →