参照官方的Documentation - initialize的说明
Special Considerations
initialize
is invoked only once per class. If you want to perform independent initialization for the class and for categories of the class, you should implementload
methods.
每个类只执行一次initialize
方法。如果想在分类和类中分别执行一些初始化方法,可以在load
方法中实现。
网友评论