美文网首页UILabel
我已经阅读并接受用户使用协议

我已经阅读并接受用户使用协议

作者: 失忆的程序员 | 来源:发表于2017-10-31 17:24 被阅读7次

    // 协议 label

    UILabel *xieyiL = [[UILabel alloc] initWithFrame:CGRectMake(bottomView.height/3, 0, bottomView.width - 40 - bottomView.height/3, bottomView.height/3)];

    xieyiL.textAlignment = NSTextAlignmentLeft;

    xieyiL.font = Font(12);

    NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"我已经阅读并接受用户使用协议"];

    [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12.0] range:NSMakeRange(8, 6)];

    [str addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(8, 6)];

    //加下划线

    [str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:NSMakeRange(8, 6)];

    xieyiL.attributedText = str;

    [bottomView addSubview:xieyiL];

    UIButton *xieyiBtn = [[UIButton alloc] initWithFrame:CGRectMake(bottomView.height/3, 0, bottomView.width - 40 - bottomView.height/3, bottomView.height/3)];

    [xieyiBtn addTarget:self action:@selector(bottomBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];

    xieyiBtn.tag = 4001;

    [bottomView addSubview:xieyiBtn];

    相关文章

      网友评论

        本文标题:我已经阅读并接受用户使用协议

        本文链接:https://www.haomeiwen.com/subject/minbpxtx.html