Escolar Documentos
Profissional Documentos
Cultura Documentos
What is covered:
Cocoa application development Objective-C as the primary programming
language
Xcode tools
Interface Builder
Used for GUI construction Used to link UI elements to methods in code
Interface Builder
Used to edit the .nib file Can access this through Project Builder or Xcode The .nib file defines what objects exist at startup in the application
The .nib file specifies the links between user interface elements
Mac OS X Environment
Cocoa
Set of OO APIs derived from NeXT technologies
The NS prefix of most Cocoa objects stands for
NeXTSTEP.
Framework for building applications
Set of objects that mediate between the program
and the OS
Used to take advantage of Carbon features Most of the iApps are built on top of Cocoa
iPhoto, iDVD, iChat, Mail
Cocoa Layer
A set of object-oriented frameworks that provide a
runtime environment for applications A part of development environment that helps to bring applications from design stage to deployment - Two Objective C frameworks UIKit framework -provides the objects an application displays in its user interface Foundation framework -defines the basic behavior of objects,establishes mechanisms for their management.
Objective-C
An extension of ANSI C
Programmer can choose to implement features as
classes (in an OO manner) or use standard C methods such as structures Main extensions are message passing and the syntax for defining classes and methods The extensions are straightforward, the OO design principles are sometimes hard to comprehend.
Receiver
Method Name
declarations etc.
2.
3. 4.
main() function in main.m calls NSApplication() This opens the .nib file for the application The .nib file defines what objects are created The classes which define these objects can have a startup method (called awakeFromNib())
In the original (Smalltalk) conception, MVC is made up of the Composite, Strategy, and Observer patterns.
CompositeThe view objects in an application are actually a
composite of nested views that work together in a coordinated fashion (that is, the view hierarchy). These display components range from a window to compound views, such as a table view, to individual views, such as buttons. User input and display can take place at any level of the composite structure. StrategyA controller object implements the strategy for one or more view objects. The view object confines itself to maintaining its visual aspects, and it delegates to the controller all decisions about the application-specific meaning of the interface behavior. ObserverA model object keeps interested objects in an applicationusually view objectsadvised of changes in its state.
UIKit
is the UI framework in the IPhoneRuntime, the equivalent of AppKit for traditional OS X apps. Most of the classes are more or less equivalent to their NS- prefixed AppKit counterparts.
Useful classes: UIHardware UIWindow UIImageView UIButtonBar UITextLabel UIKeyboard UISliderControl UIPickerView
Storyboards
Layout the workflow of your app using the Storyboards feature built into the design tools of Xcode. Created for apps that use navigation and tab bars to transition between views, Storyboards eases the development by managing the view controllers for you. You can specify the transitions and segues that are used when switching between views without having to code them by hand.
iPhone simulator
- To run, test and debug the application Interface Builder - To assemble user interface Instruments - To analyze performance graphically
other ways, such as by using Safari-style tabs to implement multiple, workflowspecific layouts of the workspace window. For example, you can use one tab to view a header file and another to view an implementation file.
You can also create multiple
workspace windows. Each tab or workspace window can be customized independently of the others.
Thank You