简单的方法定义:
-(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()
中调用的方法?