This repository contains examples that I completed when reading the Objective-C Programming The Big Nerd Ranch Guide.
The folder AGoodStart represents the Part 1 of the book.
The folder Turkey represents Chapter 3 Variables and Types in the book.
The folder TwoFloats contains the challenge for Chapter 3 Variables and Types in the book.
The folder ClassCertificates represents Chapter 5 Functions in the book.
The folder BeerSong represents Chapter 5 Functions in the book.
The folder Degrees represents Chapter 5 Functions in the book.
The folder Triangle contains the challenge Chapter 5 Functions in the book.
I will update the README to match the correct chapters as soon as I get the time. I'm very lazy about this.
The folder Callbacks represents Chapter 24 Callbacks in the book.
Some notes about that chapter include the following:
For Objective-C programmers there are three forms of callbacks;
Target-Action . Objects that do just one thing use target-action. Objects do not own their targets so if you should zero the target pointer in its dealloc method:
- (void)dealloc
{
[buttonThatKeepsSendingMeMessages setTarget:nil];
}
Helper-Objects . Objects that have more complicated lives use helper objects and the most common type of helper is the delegate.
- (void)dealloc
{
[windowThatBossesMeAround setDelegate:nil];
[tableViewThatBegsForData setDataSource:nil];
}
Notifications . Objects that might need to trigger callbacks in several other object use notifications.
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}