NSObject 其实 实现了 NSObject协议,并不像java里的 Object 类一样。此协议定义了如下方法:
Identifying Classes
- – class required method
- – superclass required method
Identifying and Comparing Objects
- – isEqual: required method
- – hash required method
- – self required method
Managing Reference Counts
- – retain required method
- – release required method
- – autorelease required method
- – retainCount required method
Testing Object Inheritance, Behavior, and Conformance
- – isKindOfClass: required method
- – isMemberOfClass: required method
- – respondsToSelector: required method
- – conformsToProtocol: required method
Describing Objects
- – description required method
Sending Messages
- – performSelector: required method
- – performSelector:withObject: required method
- – performSelector:withObject:withObject: required method
Determining Allocation Zones
- – zone required method
Identifying Proxies
– isProxy required method