LoginSignup
13
11

More than 5 years have passed since last update.

objc_msgSendで "Too many arguments to function call"と怒られる

Posted at

xcode6で既存のライブラリを再コンパイルしていたら objc_msgSendで怒られるようになった。

スクリーンショット 2014-10-03 14.46.26.png

  objc_msgSend (_delegate, @selector(hogeAction:), opt);

こういうのは下のようにキャストするか typedefで定義して使うことになったらしい。

  ((void(*)(id, SEL, id))objc_msgSend)(_delegate, @selector(hogeAction:), opt);

参考:

13
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11