class extension in objective-c

前端 未结 6 1406
花落未央
花落未央 2021-01-07 01:48

I am learning object-c by reading a book. When I read the chapter about class extension, the book gives the following example code:

// A class extension
@int         


        
6条回答
  •  轮回少年
    2021-01-07 02:34

    What I got from it is that the property officeAlarmCode is only visible within the BNREmployee.m file, it will not be accessible from main.m.

    To pass the value to mikeysCode you would have to create a method that returns officeAlarmCode.

提交回复
热议问题