如果在@selector()中使用,如何获取Xcode来查找方法的调用者?

简单的方法定义:

-(void)coolMethod {
    // cool method stuff
}

我在其他地方使用@selector()调用该方法:

NSTimer * timer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(coolMethod) userInfo:nil repeats:false];
[timer fire];

如果我按下Command键并单击coolMethod并选择Callers...,或使用Navigate to Related Items菜单,Xcode找不到这种用法。

如果我在coolMethod上单击鼠标右键并选择Find Usages,则使用AppCode可以正确找到此用法。

如何让Xcode查找方法的所有用法,甚至包括在@selector()中调用的方法?

jsftgkafgjag 回答:如果在@selector()中使用,如何获取Xcode来查找方法的调用者?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3150583.html

大家都在问