Basic iPhone Dev notes - Cocoa and Objective C
Cocoa Touch is the basic framework for iPhone applications. This framework was designed around a
is the user-interface portion of the application. The
is where the application data is handled. The
is the portion of the application which binds the
together. The View and the Controller can talk back and forth. The Model and the Controller can talk back and forth. But the Model and the View shouldn't speak to each other. This separation of concerns is one of the attractive aspects of this architecture.
(As a side note, the MVC architecture is also used as an alternative architecture to WebForms in the latest ASP.NET releases.)
are instance variable that are declared using the keyword
. You can think of an Outlet as a pointer that points to an object within the NIB. It is through these outlets that your controller class talks to your user interface objects in the NIB file (or View).
are methods in the controller class. They can be thought of as ways which objects in your NIB file (view) can talk with your controller class (Controller).
Cocoa also makes extensive use of
(a familiar concept from .NET), which are classes that take responsibility for doing certain things on behalf of another class/object/type.
One more intro tidbit is that Objective C uses angle brackets to indicate that a class conforms to a certain protocol. A protocol is a group of methods.
Interface Builder is more than UI layout control. Also, it will create instances of any other classes you specify.
© LimberTech 2016
For a great iPhone app to track your running, walking, and biking activities go to muvwu!