Monday, January 3, 2011
iPon
What I learned today about iPhone apps is:
The software architecture of an iPhone is something like this from top to bottom:
- Your sweet application
- Cocoa Touch Framework: (Contains UIKit and Foundation framework) Handles UI elements, events, things about application lifecycle. Also contains wrappers around certain data types (like mutable/immutable arrays, sets, dictionaries), basic utilities and conventions for some core concepts like memory management, data management, etc..
- Media: handles graphics, animation, sound and video
- Core services: Data types, things like location awareness and networking, database access with SQLite, etc...
- Core OS layer: OS services like I/O, threads, sockets, power management, etc...
Misc tips:
Method calls actually represent messages to the objects in memory. These messages are dispatched by the runtime. So this means that if you're calling a method on a null object, you don't get a null reference exception because for the runtime this is seen as a message is being sent to a nonexisting object, so the runtime does nothing when this case happens and no exceptions get thrown.
If you want to get the third character of your myString instance, then your method call looks like this: myChar = [myString characterAtIndex: 3] . Here the parameter is supplied with parametername: value construct, which is named as a "keyword".
It's really hard to be both alienating and mysterious :D
Labels:
iphone,
quick intro
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment