參考文章地址:https://blog.csdn.net/u013316626/article/details/71059601
目的是讓label的字體貼上面。
? ? self.textLabel.frame = CGRectMake(BGAdaptedWidth(19),? CGRectGetMaxY(self.titleLabel.frame) + BGAdaptedHeight(32), BGAdaptedWidth(302), BGAdaptedWidth(270));
? ? self.textLabel.text= BGLocaltring(@"31313151313131313213131一大段落文字");
? ? self.textLabel.numberOfLines = 0;
? ? [self.textLabel sizeToFit];
? ? self.textLabel.mj_w = BGAdaptedWidth(302);
? ? [self.textLabel sp_setLineSpace: BGAdaptedHeight(11)];//設(shè)置行間距
設(shè)置button的兩個(gè)圓角
? ? UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:self.agreeButton.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(BGAdaptedWidth(10), BGAdaptedWidth(10))];
? ? CAShapeLayer * layer = [[CAShapeLayer alloc] init];
? ? layer.frame=self.agreeButton.bounds;
? ? layer.path= path.CGPath;
? ? self.agreeButton.layer.mask= layer;