毛玻璃效果的Label
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
UIBlurLabelDemo
VQBlurLabel
.gitignore
LICENSE
README.md

README.md

VQBlurLabel

==== 可以非常方便的创建一个简单的毛玻璃效果的Label

导入头文件 #import VQBlurLabel.h

>>使用以下代码:

//文本内容
NSString *text = @"你好吗你好吗你好吗你好吗';';.'\n32424你好\n吗";

//计算文本的尺寸
CGRect textRect = [text boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:50]} context:nil];

//添加控件
 VQBlurLabel *blurLabel = [[VQBlurLabel alloc]initWithFrame:CGRectMake(100, 100, 200, textRect.size.height)];
 blurLabel.text = text;
 blurLabel.fontSize = 50;
 blurLabel.layer.cornerRadius = 10;
 blurLabel.layer.masksToBounds = YES;

 [self.view addSubview:blurLabel];

Demo示例效果演示