NSObject头文件解析
当我们需要自定义类都会创建一个NSObject子类, 比如:
#import <Foundation/Foundation.h>@interface ClassA : NSObject@end
那么NSObject里面具体有什么呢? 我们点到它的头文件里面去看看
NSObject <NSObject>+ (+ (- NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER+ (instancetype) OBJC_SWIFT_UNAVAILABLE(+ (instancetype)allocWithZone:( _NSZone *)zone OBJC_SWIFT_UNAVAILABLE(+ (instancetype)alloc OBJC_SWIFT_UNAVAILABLE(- ()dealloc OBJC_SWIFT_UNAVAILABLE(- ()finalize OBJC_DEPRECATED(- (- (+ ()copyWithZone:( _NSZone *+ ()mutableCopyWithZone:( _NSZone *++ (BOOL)conformsToProtocol:(Protocol *-+- (- ()forwardingTargetForSelector:(SEL)aSelector OBJC_AVAILABLE(, , , - ()forwardInvocation:(NSInvocation *)anInvocation OBJC_SWIFT_UNAVAILABLE(- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector OBJC_SWIFT_UNAVAILA