我有许多网点和一个 NSSearchfield 的视图,如果用户在搜索字段中按下向上箭头,我想对网点做一些有趣的事情。我想在没有子类化的情况下做到这一点,因为我在访问其他类的出口时遇到了一些问题
编辑:我对网点的问题是我无法从我的子类中更改它们的字符串值
if ([event keyCode]==126){
Myclass* c= [[Myclass alloc] init]; // the class that have the outlets
[c searchf];} //function that something interesting with the outlets