iOS UIButton颜色渐变 titleLabel字体不显示

//渐变颜色
        CAGradientLayer *_gradientLayer = [CAGradientLayer layer];
        _gradientLayer.colors = @[(__bridge id)[UIColor colorWithRed:255/255.0 green:157/255.0 blue:72/255.0 alpha:1.0].CGColor, (__bridge id)[UIColor colorWithRed:253/255.0 green:93/255.0 blue:59/255.0 alpha:1.0].CGColor];
        _gradientLayer.startPoint = CGPointMake(0.5, 0);
        _gradientLayer.endPoint = CGPointMake(0.5, 1);
        _gradientLayer.frame = addBtn.bounds;
        _gradientLayer.cornerRadius = 22;
        [addBtn.layer insertSublayer:_gradientLayer atIndex:0];//注意添加顺序 

推荐阅读更多精彩内容