Code Monkey home page Code Monkey logo

objectivec-programming's Introduction

ObjectiveC-Programming

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];
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.