instance variable 'name' accessed in class method
实例变量名'name‘ 在一个“类方法”(+号方法)里被使用。
原因:静态方法访问了非静态属性(.h声明的那些属性)即这个方法是加号方法却使用了变量。
类方法里面不能访问本类和其他类的属性和全局变量,但是本方法类可以定义临时的变量;
instance variable 'name' accessed in class method
实例变量名'name‘ 在一个“类方法”(+号方法)里被使用。
原因:静态方法访问了非静态属性(.h声明的那些属性)即这个方法是加号方法却使用了变量。
类方法里面不能访问本类和其他类的属性和全局变量,但是本方法类可以定义临时的变量;