没有特别多时间来集中看objC和iOS的书,就上下班路上看了一下Standford的课程CS193P,入门绰绰有余了。
Course web site ■ http://cs193p.stanford.edu/
• Other web sites
■ Apple Dev Center: http://developer.apple.com/
■ Developer Forums: http://devforums.apple.com/
External resources:
■ http://cs193p.com/
■ http://groups.google.com/group/iphone-appdev-auditors/
Cocoa Touch iPhone SDK 是基于 Coco API的Framework有 Foundation和UIKit
UIKit
User interface elements
Application runtime
Event handling
Hardware APIs
Foundation
Utility classes
Collection classes
Object wrappers for system services
Subset of Foundation in Cocoa
-InstanceMethod
+ClassMethod
UIAction
UIOutlet
Target - Action
Object creation
■ All objects allocated out of the heap
■ No stack based objects
id is Dynamically-typed object
Message Syntax:
[receiver message:arg1 andArg:arg2]
• Objects represented in format strings using %@
Selector 类似函数指针
Selectors include the name and all colons, for example:
! -(void)setName:(NSString *)name age:(int)age;
would have a selector:
! SEL sel = @selector(setName:age:);
Array - ordered collection of objects
• Dictionary - collection of key-value pairs
• Set - unordered collection of unique objects