【发布时间】:2010-10-05 08:30:12
【问题描述】:
例如,我想将变量传递给 UIButton 操作
NSString *string=@"one";
[downbutton addTarget:self action:@selector(action1:string)
forControlEvents:UIControlEventTouchUpInside];
而我的动作函数是这样的:
-(void) action1:(NSString *)string{
}
但是,它返回一个语法错误。 如何将变量传递给 UIButton 动作?
【问题讨论】: