Overriding methods using categories in Objective-C

后端 未结 4 767
悲哀的现实
悲哀的现实 2020-11-22 04:37

Can I use a class category to override a method that is already implemented using a category? Like this:

1) Original method

-(BOOL) method {
  retur         


        
4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 05:21

    You can do this by adapting Class Cluster approach, or using methods swizzling technique.

    Otherwise, the behavior of two or more categorized methods is undefined

提交回复
热议问题