有人可以为我澄清一下:
当有多个参数时,参数在冒号后的方法名称中声明.参数在声明中将名称分开,就像在消息中一样.例如:
- (void)setWidth:(float)width height:(float)height;
Run Code Online (Sandbox Code Playgroud)
所以在上面:
但为什么它是高度的:(浮动)高度; 而不仅仅是:
- (void)setWidth: (float)width (float)height;
Run Code Online (Sandbox Code Playgroud) objective-c ×1