84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
通过拖线的方式,将控件属性放到.m文件的@interface中的变量声明和方法声明中有什么不同呢,为什么放到变量申明的时候不能通过self.去访问?如图中3位置中只能访问2位置而不能访问1位置中的声明。
ringa_lee
self. is calling the setter and getter methods. You only declared the variable at position 1 and did not write the setter and getter methods for the property.
@interface MyClass (Category) -(Abc*) testFunc; @end
Those with words in the brackets are declaring a Catetory for a class
@interface MyClass () -(Abc*) testExtension; @end
The blank words in the brackets are extension, and inside are the private variables and methods of this class
self. is calling the setter and getter methods. You only declared the variable at position 1 and did not write the setter and getter methods for the property.
Those with words in the brackets are declaring a Catetory for a class
The blank words in the brackets are extension, and inside are the private variables and methods of this class