Objective C Syntax Reference and Glossary

Download the reference sheet here

Keep this reference sheet handy as you proceed through Section 2 – Objective C Basics.

The Objective C syntax and jargon may seem like a lot to handle at first but it gets easier the more you immerse yourself in it!

Here’s one place where you can come back to for reference on Objective C syntax and terminology. The printable PDF for download contains the same info as below.

I’ll update both the PDF and the info below as we go on and eventually pretty the PDF up as well.


A class is a basic building block of our app. It’s a blueprint that describes the behavior and properties of a component that will be responsible for doing something in our app.

Classes are comprised of a header (.h):

And an interface file (.m):


A variable is used to hold data or keep track of an object for later referencing. A local variable is declared inside of a method and will last as long as the method is being executed. An instance variable is declared in the private interface of the .m file.

Local Variable

Instance Variable


A method is a form a communication between objects. Objects have methods which when called, will execute the block of code in the method.

Instance Method
In the .h file of the class

In the .m file of the class

Class Method
In the .h file of the class

In the .m file of the class


A property is like an instance variable that can be accessed by other objects. A property is used to store data or keep track of objects.

Declared in the .h file of a class:

Accessed in the .m file using the self keyword:

IF Statement

An If statement lets you test an expression for true or false and executes different branches of code depending on what conditions are met (or not met)

Switch Statement

A switch statement tests a single int variable and executes different branches of code depending on what the int is:

For Loop

A For loop is a counted loop and lets you execute a set of code statements for a number of times until the count is met

Do While Loop

A Do While loop will loop until a condition is met but is guaranteed to go through the loop at least once before checking the condition.

While Loop

A While loop will loop until a condition is met but will check the condition at the beginning of each loop including the first. If the condition is not met initially, then the loop will not be executed.


An array is a data structure used to store lists of objects. It has methods to add, insert, replace and access elements based on index. A mutable array can be altered after initialized whereas a regular array cannot be altered after initialization.



An array can be accessed by index like this:


A dictionary is a data structure used to store objects along with an associated key that is used later to retrieve it from the dictionary:



An object in a dictionary can be accessed by key like this:

Delegation and Protocols

Delegation is a way for an object to communicate with other objects without knowing anything about who they’re communicating with.

For example, the tableview class declares a protocol which is a list of methods

It also declares a delegate property and it will call the protocol methods on the object this delegate property points to

Any object wishing to handle communication with the tableview must implement the protocol by declaring that it conforms to the protocol in the .h file like this:

In the .m file, it must implement the protocol methods