@selector - With Multiple Arguments?

前端 未结 9 736
刺人心
刺人心 2020-12-13 02:26

I have been using @selector today for the first time and have not been able to work out how to do the following? How would you write the @selector

9条回答
  •  一生所求
    2020-12-13 03:06

    As KennyTM pointed out, the selector syntax is

    @selector(printText:andMore:)
    

    You call it with

    performSelector:withObject:withObject. 
    

    ... if you need more arguments or different types, you need to use NSIvocation

提交回复
热议问题