+load 与 +initialize #26
onnttf
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
+load
+load
再调用子类的+load
+load
方法调用方式: 通过函数指针指向函数,拿到函数地址,分开来直接调用。
+initialize
+initialize
,再调用子类的+initialize
;(先初始化父类,再初始化子类,每个类只会初始化 1 次)+initialize
会主动调用父类的+initialize
调用方式: 通过
objc_msgSend
调用。Beta Was this translation helpful? Give feedback.
All reactions