System Specification
IPhoneSpecification
Each is a 4.7-or 4.8-ounce computing device. each contains a 620 MHz arm cpu that has been underclocked to improve battery performance and reduce heat. the iPhone and iPhone 3 GB each include 128 MB of dynamic RAM (Dram) and from 4 to 16 GB of flash memory. the 3gs encoded ed an upgrade to 256 MB of RAM as well as a graphics chip enabling it to run OpenGL ES 2.0.
IPadSpecification
The iPad weighs in at 1.5 pounds for the Wi-Fi model and 1.6 pounds for the Wi-Fi + 3G model. its 9.7-inch LED screen supports a resolution of 1024x768 at 132 pixels per inch. the iPad comes in 16 GB, 32 GB, and 64 GB models, all equipped with a 1 GHz A4 custom designed CPU.
Knowing these specifications and operations is useful for the layout and operation design of the software.
IOS Structure
Most of your programming work will be done using the uikit (UI) OR Foundation (NS) frameworks. these libraries are collectively called Cocoa touch; they're built on Apple's modern cocoa framework, which is almost entirely object-oriented and, in our opinion, much easier to use than older libraries. the vast majority of code in this book will be built solely using cocoa touch.
Cocoa touchIt contains the uikit framework-which is what we spend most of our time on in this book-and the address book UI framework. uikit events des window support, event support, and userinterface management, and it lets you create both text and web pages. it further acts as your interface to the accelerometers, the camera, the photo library, and devicespecific information.
MediaIs where you can get access to the major audio and video protocols built into the iPhone and iPad. its four graphical technologies are OpenGL ES, eagl (which connects OpenGL to your native window objects), quartz (which is Apple's vectorbased Drawing Engine ), and core animation (which is also built on quartz ). other frameworks of note include core audio, open audio library, and media player.
Core ServicesOffers the frameworks used in all applications. keys of them are data related, such as the internal address book framework. core Services also contains the critical foundation framework, which includes des the core definitions of Apple's objectoriented data types, such as its arrays and sets.
Core OSProvided des the kernel-level software. You can access threading, files, networking, other I/O, and memory.
Classes in IOS
Uikit framework Classe
Class starting with UI, such as uiview classes most tightly connected to the devices, including all the graphical classes
Foundation framework classes
It starts with NS and supports basic data structures, such as array, String, URL, and XML parsing.
Others
Address book framework
Address book UI framework
Core Audio Framework
Media Player framework
Core graphics framework
Quartz core framework
OpenGL ES framework
Apns framework: Push Notification Services
Map KIT framework: This framework provides you with a simple view that you can add anywhere you want a map to appear.
Store KIT framework: the store kit API allows you to specify various items within your application.
Core foundation framework
Core location framework
NS class
The NS classes come from core services 'Foundation framework (the cocoa equivalent of the core foundation framework), which contains a huge number offundamental data types and other objects.
Root object nsobject
The UI classes
The second broad category contains the UI classes. these come from cocoa touch's uikit framework, which events des all the graphical objects you'll be using as well as all the functionality for the iPhone OS's event model, much of which appears in uiresponder.
Window, view, view Controllers
A windowIs something that spans the device's entire screen. An application has only one, and it's the overall container for everything your application does.
A ViewIs the content holder in your application. you may have several of them, each covering different parts of the window or doing different things at different times. they're all derived from the uiview class. but don't think of a view as a blank container. almost any object you use from the uikit will be a subclass of uiview that features a lot of behavior of its own. among the major subclasses of uiview are uicontrol, which gives you buttons, scyclers, and other items with which users may manipulate your program, and uiscrollableview, which gives users access to more text than can appear at once.
A View ControllerDoes what its name suggests. it acts as the controller element of the Model-View-controller Triad and in the Process manages a view, sometimes called an application view. as such, it takes care of events and updating for your view.
Object Creation
Idnewobject = [[objectclassalloc] init];
Common subclass override init Method
-(ID) Init
{
If (Self = [Super init]) {
// Instance variables go here
}
Return self;
}
Parameter-based Initialization Method
[[Uitextviewalloc] initwithframe: textfieldframe];
A special method: Used in interface Builder
Initwithcoder:
Factory method:
[Uibuttonbuttonwithtype: uibuttontyperoundedrect];