Objective-C - Overriding method in subclass

前端 未结 5 1460
借酒劲吻你
借酒劲吻你 2021-01-07 17:20

I am having some trouble figuring out hour to accurately override a method in one of my subclasses.

I have subclass (ClassB) of another customclass (ClassA):

5条回答
  •  情深已故
    2021-01-07 18:01

    -(void)methodName {
      [super methodName];
    }
    

    Wanna call methodName (in ClassB), just remove [super method] then you can fire it. Cause super is call back to ClassA

提交回复
热议问题