首页 > 其他 > 详细

UILable点击事件

时间:2015-04-26 16:23:56      阅读:135      评论:0      收藏:0      [点我收藏+]
 UILabel *lLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 19, 105, 1)];
    lLabel.backgroundColor = getColorWithRGB(40, 125, 244, 1.0);
    [protocolImageView addSubview:lLabel];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(userProtocolLogin:)];
    tap.numberOfTouchesRequired = 1;
    tap.numberOfTapsRequired = 1;
    [readLastLabel addGestureRecognizer:tap];



UILabel *readLastLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 110, 19)];
    readLastLabel.backgroundColor = [UIColor clearColor];
    readLastLabel.text = @"用户协议";
    readLastLabel.textColor = getColorWithRGB(40, 125, 244, 1.0);
    readLastLabel.font = [UIFont systemFontOfSize:14.0f];
    readLastLabel.userInteractionEnabled = YES;
    [protocolImageView addSubview:readLastLabel];

  

UILable点击事件

原文:http://www.cnblogs.com/songxing10000/p/4457791.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!