Objective-C - Overriding method in subclass

前端 未结 5 1432
借酒劲吻你
借酒劲吻你 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 17:50

    Although this question is too old, but there are sill some learners as every expert was, The following is quoted from Apple documentation. "The new method must have the same return type and take the same number and type of parameters as the method you are overriding." full answer can be found in Apple method overriding documentation Hope this helps someone.

提交回复
热议问题