Can category methods be overridden? IOS

前端 未结 1 1826
鱼传尺愫
鱼传尺愫 2021-01-04 08:33

I am trying to plan how to add a couple methods to all instances of certain objects. I think adding a category to the parent object(UIViewController) would work for what I w

相关标签:
1条回答
  • 2021-01-04 08:36

    Short answer: yes, you can. For purposes of inheritance category methods on a superclass are treated like methods that are actually defined in the superclass, and can be overridden in the same way.

    0 讨论(0)
提交回复
热议问题