OC-UILabel点击事件

laGetVoiceCode.userInteractionEnabled = YES;
UITapGestureRecognizer *getVoiceCode =
[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(getVoiceCode:)];
[_laGetVoiceCode addGestureRecognizer:getVoiceCode];


//获取语音验证码
-(void) getVoiceCode:(UITapGestureRecognizer *) recognizer{
    UILabel *label =(UILabel*) recognizer.view;
    NSLog(@"%@被点击了",label.text);
}