2
选择很多OG按钮这是我的问题,我想这样做在多个按钮,我只用一个按钮做...与UILongPressGestureRecognizer
-(void)viewDidLoad
{
UILongPressGestureRecognizer *longpressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressHandler:)];
longpressGesture.minimumPressDuration = 3;
[longpressGesture setDelegate:self];
[self.pieza11 addGestureRecognizer:longpressGesture];
[self.pieza12 addGestureRecognizer:longpressGesture];
[self.pieza13 addGestureRecognizer:longpressGesture];
[self.pieza14 addGestureRecognizer:longpressGesture];
[longpressGesture release];
}
请举例子?即时通讯做它: – 2012-02-02 13:38:41
- (IBAction为)tocarLargo:(ID)发送方 { UILongPressGestureRecognizer * longpressGesture = [[UILongPressGestureRecognizer的alloc] initWithTarget:自动作:@selector(longPressHandler :)]; longpressGesture.minimumPressDuration = 3; [longpressGesture setDelegate:self]; [self.pieza11 addGestureRecognizer:longpressGesture]; } 这是正确的? – 2012-02-02 13:41:02
亲爱的一个按钮事件,你正在添加一个长按手势到另一个按钮。 你真正想做什么,请详细解释一步一步。 – Prashant 2012-02-03 05:03:49