Call a class method from within that class

后端 未结 4 1429
孤城傲影
孤城傲影 2020-12-08 14:39

Is there a way to call a class method from another method within the same class?

For example:

+classMethodA{
}

+classMethodB{
    //I would like to          


        
4条回答
  •  醉梦人生
    2020-12-08 15:31

    In objective C 'self' is used to call other methods within the same class.

    So you just need to write

    +classMethodB{
        [self classMethodA];
    }
    

提交回复
热议问题