Saturday 10 July 2010

Handling Basic User Interaction (iPhone Development)

Uses the Model-View-Control methodology. MVC divides all the functionality up into 3 distinct categories.
  • Model - The classes that hold your application's data
  • View - Made up of the windows, controls and other elements that the user can see and interact with. 
  • Controller - Binds the model and view together and is the application logic that decides how to handle the users input.
Controller class can refer to objects in the nib by using a special kind of instance variable called an outlet. 
An outlet is like a pointer that points to an object within a nib.
In the opposite direction , interface objects in the nib can be set up to trigger special methods in the controller class. These special methods are known as action methods.

@synthesize tells the compiler to automatically create the accessor and mutator methods for us (getters and setters).

Releasing objects when you are done with them is very important as iPhone device is constrained.

Delegates are classes that take responsibility for doing certain things on behalf of another object.

Hold down the otpion key, move the cursor over the word so it turns into a crosshair, when it does double click!  

No comments:

Post a Comment

Search This Blog