2012-03-07 78 views
0

我需要传递一个方法名称给@selector(method),该方法是一个包含在数组中的值。如何将方法名称的变量传递给@selector()?

[myButton addTarget:self action:@selector(method:) forControlEvents:UIControlEventTouchDown]; 

如何在循环内定义@selector()避免必须对每个@selector(method)进行硬编码?我可以传递字符串值吗?

回答

相关问题