// 角标
-(void) initTagWithTitleAndPoint:(NSString*)title originX:(CGFloat)x originY:(CGFloat)y fatherView:(UIView*)view
{
UILabel *tagLabel = [[UILabel alloc] init];
tagLabel.frame = CGRectMake(x, y, 20, 20);
tagLabel.backgroundColor = [UIColor redColor];
tagLabel.layer.masksToBounds = YES;
tagLabel.layer.cornerRadius = 10;
tagLabel.text = title;
tagLabel.textColor = [UIColor whiteColor];
tagLabel.font = [UIFont systemFontOfSize:15.0];
tagLabel.textAlignment = NSTextAlignmentCenter;
[view addSubview:tagLabel];
}
iOS角标
最新推荐文章于 2018-04-09 09:24:25 发布