The iPhone OS's frameworks are divided into four major layers. Each of these layers contains a variety of frameworks that you can access when writing iPhone SDK programs. Generally, you should prefer the higherlevel layers when you're coding.
Cocoa Touch is the framework that you'll become most familiar with. It contains the UIKit framework and the address UI framework. UIKit includes 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.
Media is 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 Services offers the frameworks used in all applications. Many of them are data related, such as the internal Address Book framework. Core Services also contains the critical Foundation framework, which includes the core definitions of Apple's objectoriented data types, such as its arrays and sets.
Core OS includes the kernel-level software. You can access threading, files, networking, other I/O, and memory.
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.
But you'll sometimes have to fall back on libraries that are instead based on simple C functionality. Examples include Apple's Quartz 2D and Address Book frameworks, as well as third-party libraries like SQLite. Expect object creation, memory management, and even variable creation to work differently for these non-Cocoa libraries. When you fall back on non-Cocoa libraries, you'll sometimes have to use Apple's Core Foundation framework, which lies below Cocoa.
Although Core Foundation and Cocoa are distinct classes of frameworks, many of their common variable types are toll-free bridged, which means they can be used interchangeably as long as you cast them. Thus, for example, CFStringRef and NSString are toll-free bridged. The Apple class references usually point out this toll-free bridging for you.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Christian Glousten at
09232010
1. What Apple really undertook to promote the iPod
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga