ios 第2天

类的方法和实例的方法  

  -(void)runwithspeed:(int)speed and direction:(int)direction;

实例方法 -开头 运用对象调用 函数名为runwithspeed: and direction  变量为speed ,dirrection;

 + (NSString*)fetch;

类方法  + 开头 可以直接用类名调用  

[类名  fetch];调用

  实例方法在的调用   注意函数参数的写法                实例方法的声明 注意参数的写法

原文地址:https://www.cnblogs.com/studyios/p/3515733.html