【发布时间】:2011-10-12 07:45:01
【问题描述】:
我有以下几点:
UITapGestureRecognizer *tapGesture;
SEL sel = @selector(profilePop:withUser:) withObject:tapGesture withObject:message.creator;
tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:sel];
我希望它能够调用:
- (void)profilePop:(UITapGestureRecognizer *)recognizer withUser:(Login *)user
{
//some code here
}
但为什么不这样做呢?
【问题讨论】:
-
profilePop:withUser: 在自己的界面吗?
-
处理程序希望如何接收
(Login *)user参数? -
我已经编辑了上面的代码,很抱歉,现在它给了我一个错误,sel 需要一个']'?
-
那我该如何改变它
-
那我该如何定义传入参数参数的对象呢?
标签: iphone objective-c ipad