Objects and classes
A class consists primarily of two things: variables that can store data and methodsthat can perform operations.Subclasses
Classes can also inherit functionality from an existing classInstance and class variables
Changing the value of an instance variable in one object
will not affect the value of the same variable in all the other objects of that class.Conversely, only a single copy of a class variable exists. If you change the value ofa class variable from one object, the value of that variable will change for all theobjects of that classAccessor methods
Accessor methods, sometimes called getters and setters, are usually fairly simplemethods used to get and set instance variables in a classClass methods
Class methods (also known as static methods) are methods that are associated directlywith the class rather than the object instance
Events and messages
An event is a message generated by the user interacting with your application’scontrols. For instance, if you tap the screen of your iOS device, this generates a UIevent in your application that is passed via a message from the application to anobject that has been delegated to deal with that specific type of eventProtocols
A protocol definition declares methods that any class can implement. If your classdeclares that it abides by a particular protocol definition, you are announcing thatyou have implemented the minimum mandatory methods declared in the protocoldefinition, and may optionally have implemented some nonmandatory methodsDelegate classes
A delegate class is a class that implements a protocol for handling events.Event loop
The main event loop is the principal control loop for your application.Reference Counting
Reference counting is a form of garbage collection, which counts the number of references
to an object (or portion of memory) and frees the associated memory when thenumber of references reaches zero. The main advantage of reference counting over"classic" garbage collection is that memory is freed as soon as it is no longer in use