Too many arguments to function call, expected 0, have 3

后端 未结 11 1452
情话喂你
情话喂你 2020-12-12 18:55

This compiles/works fine with Xcode 5, but causes a compile error with Xcode 6 Beta 4:

objc_msgSend(anItem.callback_object,
NSSelectorFrom         


        
11条回答
  •  忘掉有多难
    2020-12-12 19:49

    I found the answer, and it's in Session 417 from 2014 WWDC "What's New in LLVM". If you find this code in a 3rd party library, such as Apsalar, updating to the latest version fixes it (probably because it's not distributed as a lib, ha). For an example of casting of these calls, see THObserversAndBinders library - I'm using it and noticed that the author updated the code, such as here:

    https://github.com/th-in-gs/THObserversAndBinders/blob/master/THObserversAndBinders/THObserver.m

提交回复
热议问题