iOS UILabel touch event

label.userInteractionEnabled = YES;
UITapGestureRecognizer *tapGesture =
      [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTouch)] autorelease];
[label addGestureRecognizer:tapGesture];

0 意見: