I have an NSString containing the name of a selector I would like to call with performSelector. How can I get a reference to the selector from the string?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
NSSelectorFromString(name)
回答2:
Could use NSSelectorFromString.
Probably inefficient as parameterizing a SEL is preferred.