kade

技術系の記事を書いていきます。

Xcode: used as the name of the previous ... Warningを消す

今まで無視してたのですが

used as the name of the previous parameter rather than as part of the selector

というWarningが鬱陶しかったので消すことにしました。

-(void)hoge:(int)fuga:(float)foo{
  NSLog(@"%d:%f",fuga,foo);
}

となっていると多分エラーが出ます。

-(void)hoge:(int)fuga floatVar:(float)foo{
  NSLog(@"%d:%f",fuga,foo);
}

こんな風に引数に説明をつけてあげるとWarningが消えます。