Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
I. Getting Started
1. You and This Book
C and Objective-C
How this book works
How the life of a programmer works
2. Your First Program
Installing Apple’s developer tools
Getting started with Xcode
Where do I start writing code?
How do I run my program?
So what is a program?
Don’t stop
II. How Programming Works
3. Variables and Types
Types
A program with variables
Challenge
4. if/else
Boolean variables
else if
For the More Curious: Conditional (ternary) operator
Challenge
5. Functions
When should I use a function?
How do I write and use a function?
How functions work together
Local variables, frames, and the stack
Recursion
Looking at the frames in the debugger
return
Global and static variables
Challenge
6. Numbers
printf()
Integers
Tokens for displaying integers
Integer operations
Floating-point numbers
Tokens for displaying floating-point numbers
Functions for floating-point numbers
Challenge
7. Loops
The while loop
The for loop
break
continue
The do-while loop
Challenge
8. Addresses and Pointers
Getting addresses
Storing addresses in pointers
Getting the data at an address
How many bytes?
NULL
Stylish pointer declarations
Challenges
9. Pass By Reference
Writing pass-by-reference functions
Avoid dereferencing NULL
10. Structs
Challenge
11. The Heap
III. Objective-C and Foundation
12. Objects
Creating and using your first object
Message anatomy
Objects in memory
id
Challenge
13. More Messages
Nesting message sends
Multiple arguments
Sending messages to nil
Challenge
14. NSString
Challenge
15. NSArray
NSMutableArray
Challenges
16. Developer Documentation
Reference pages
Quick Help
Other options and resources
17. Your First Class
Accessor methods
Dot notation
Properties
self
Multiple files
Challenge
18. Inheritance
Overriding methods
super
Challenge
19. Object Instance Variables
Object ownership and ARC
Creating the Asset class
Adding a to-many relationship to Employee
Challenge
20. Preventing Memory Leaks
Retain cycles
Weak references
Zeroing of weak references
For the More Curious: Manual reference counting and ARC History
Retain count rules
21. Collection Classes
NSArray/NSMutableArray
Immutable objects
Sorting
Filtering
NSSet/NSMutableSet
NSDictionary/NSMutableDictionary
C primitive types
Collections and nil
Challenge
22. Constants
Preprocessor directives
#include and #import
#define
Global variables
enum
#define vs global variables
23. Writing Files with NSString and NSData
Writing an NSString to a file
NSError
Reading files with NSString
Writing an NSData object to a file
Reading an NSData from a file
24. Callbacks
Target-action
Helper objects
Notifications
Which to use?
Callbacks and object ownership
25. Protocols
26. Property Lists
Challenge
IV. Event-Driven Applications
27. Your First iOS Application
Getting started with iTahDoodle
BNRAppDelegate
Adding a C helper function
Objects in iTahDoodle
Model-View-Controller
The application delegate
Setting up views
Running on the iOS simulator
Wiring up the table view
Adding new tasks
Saving task data
For the More Curious: What about main()?
28. Your First Cocoa Application
Edit BNRDocument.h
A look at Interface Builder
Edit BNRDocument.xib
Making connections
Revisiting MVC
Edit BNRDocument.m
Challenges
V. Advanced Objective-C
29. init
Writing init methods
A basic init method
Using accessors
init methods that take arguments
Deadly init methods
30. Properties
Property attributes
Mutability
Lifetime specifiers
Advice on atomic vs. nonatomic
Key-value coding
Non-object types
31. Categories
32. Blocks
Defining blocks
Using blocks
Declaring a block variable
Assigning a block
Passing in a block
typedef
Return values
Memory management
The block-based future
Challenges
Anonymous block
NSNotificationCenter
VI. Advanced C
33. Bitwise Operations
Bitwise-OR
Bitwise-AND
Other bitwise operators
Exclusive OR
Complement
Left-shift
Right-shift
Using enum to define bit masks
More bytes
Challenge
34. C Strings
char
char *
String literals
Converting to and from NSString
Challenge
35. C Arrays
36. Command-Line Arguments
37. Switch Statements
Next Steps
Index
More From Big Nerd Ranch...
← Prev
Back
Next →
← Prev
Back
Next →