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
Introduction
Chapter 1: Becoming a Great iOS or Mac Programmer
Thinking like a Developer
Completing the Development Cycle
Introducing Object Oriented Programming
Working with the Alice Interface
Summary
Exercises
Chapter 2: Programming Basics
Taking a Tour with Alice
Navigation Menu
World Window
Classes, Objects, and Instances in Alice
Object Tree
Editor Area
Details Area
Events Area
Creating an Alice App—To the Moon Alice
Your First Objective-C Program
Launching and Using Xcode 4.2
Summary
Exercises
Chapter 3: It’s All About the Data
Numbering Systems Used in Programming
Bits
Bytes
Hexadecimal
Unicode
Data Types
Using Variable and Data Types with Alice
Data Types and Objective-C
Identifying Problems
Summary
Exercises
Chapter 4: Making Decisions About…and Planning Program Flow
Boolean Logic
Truth Tables
Comparison Operators
Designing Apps
Pseudo-Code
Design Requirements
Flowcharting
Designing and Flowcharting an Example App
The App’s Design
Using Loops to Repeat Program Statements
Coding the Example App in Alice
Coding the Example App in Objective-C
Nested If Statements and Else-If Statements
Removing Extra Characters
Improving the Code Through Refactoring
Running the App
Moving Forward Without Alice
Summary
Exercises
Chapter 5: Object Oriented Programming with Objective-C
The Object
What Is a Class?
Planning Classes
Planning Properties
Planning Methods
Implementing the Classes
Inheritance
Why Use OOP?
It is everywhere
Eliminate Redundant Code
Ease of Debugging
Ease of Replacement
Advanced Topics
Interface
Polymorphism
Summary
Exercises
Chapter 6: Learning Objective-C and Xcode
A Brief History of Objective-C
Understanding the Language Symbols
Putting the “Objective” into Objective-C
Writing Another Program in Xcode
Creating the Project
Summary
Exercises
Chapter 7: Objective-C Classes, Objects, and Methods
Creating an Objective-C Class
Declaring Interfaces and Instance Variables
Sending Messages (Methods)
Working with the Implementation File
Coding Your Methods
Using Your New Class
Creating Your Project
Adding Objects
Writing the Implementation File
Creating the User Interface
Hooking Up the Code
Running the Program
Taking Class Methods to the Next Level
Accessing the Xcode Documentation
Summary
Exercises
Chapter 8: Programming Basics in Objective-C
Collections
Using NSSet
Using NSArray
NSDictionary
Determining Class Type in a Collection
Using the Mutable Classes
NSMutableSet
NSMutableArray
NSMutableDictionary
Creating the BookStore Application
Introducing Instance Variables
Accessing Instance Variables
Using Getter and Setter Methods
Introducing Properties
Using Properties
Understanding the Importance of Conventions
Finishing the MyBookstore Program
Creating the View
Adding Instance Variables
Adding a Description
Creating a Simple Data Model Class
Modifying the MasterViewController
Modifying the DetailViewController
Summary
Exercises
Chapter 9: Comparing Data
Revisiting Boolean Logic
Using Relational Operators
Comparing Numbers
Creating an Example Xcode App
Using Boolean Expressions
Comparing Strings
Comparing Dates
Combining Comparisons
Using the Switch Statement
Summary
Exercises
Chapter 10: Creating User Interfaces
Understanding Interface Builder
The Model-View-Controller
Human Interface Guidelines (HIGs)
Creating an Example iPhone App with Interface Builder
Using Interface Builder
The Dock
The Library
Inspector Pane and Selector Bar
Creating the View
Using Outlets
Connecting Actions and Objects
Implementation File
Summary
Exercises
Chapter 11: Storing Information
Storage Considerations
Preferences
Writing Preferences
Reading Preferences
Databases
Storing Information in a Database
Getting Started with Core Data
The Model
Managed Object Context
Setting Up the Interface
Summary
Exercises
Chapter 12: Protocols and Delegates
Multiple Inheritance
Understanding Protocols
Protocol Syntax
Understanding Delegates
Next Steps
Summary
Chapter 13: Memory, Addresses, and Pointers
Understanding Memory
Bits, Bytes, and Bases
Converting Base-10 (Decimal) to Base-2 (Binary)
Using Base-16 (Hexadecimal) Numbering
Understanding Memory Address Basics
Allocating Memory
Working with Automatic Variables and Pointers
Deallocating Memory
Using Special Pointers
Managing Memory in Objective-C with ARC
Managing Memory in Objective-C Without ARC
Using the Retain/Release Model
Working with Implied Retain Messages and Autorelease
Sending the dealloc Message
If Things Go Wrong
A Note About ARC
Summary
Exercises
Chapter 14: Introducing the Xcode Debugger
Getting Started with Debugging
Setting Breakpoints
Using the Breakpoint Navigator
Debugging Basics
Working with the Debugger Controls
Using the Step Controls
Looking at the Thread Window and Call Stack
Debugging Variables
Dealing with Code Errors and Warnings
Warnings
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →