iOS Platform Development Introduction
Last time in iOS100...
We further explored:
- Using Instances
- Creating Objects
- Sending Messages
Created a command line tool
Created and populate arrays with objects
Iterated though our arrays
Subclassed an Objective-C class (NSObject)
Overrode parent class methods
Implemented out own custom Initializers
Implement class and instance methods
- Implemented properties for our instance varables
What is the difference between the following two method calls?
// Create a variable that will point to an NSMutableArray Object...
myParty = [NSMutableArray alloc];
Class vs Instance Methods
- Instance Methods
- Operates on a particular instance of a class
- Invoked by sending a message to a specific instance of a class
- Denoted by a "-" in the method declaration
- Class Methods
- Typically creates a new instance of the class or retrieves a global property of the class.
- Invoked by sending a message to the class itself
- Denoted by a "+" in the method declaration
What are two different ways we can iterate though an array?
Create a mutable party array object that contains the following:
- Output all of the values inside of the array
- Traditional for loop
- Fast enumeration
What is overriding a method?
Override the description method of a class to return the string
"I control you!"
- Create a prime number calculator
- Building user interfaces
- Simple Controls
- Interacting with controls from a class
- Error handling
Prime Number Calculator
iOS100 - iOS Platform Development Introduction - Day 4
By Alex Rodriguez