]ios标签视图控制器中角标的定制

来源:互联网 发布:淘宝网冻结 编辑:程序博客网 时间:2024/06/16 09:22

UILabel *label = [[UILabelalloc]initWithFrame:CGRectMake(235,4, 20, 16)];

   label.text = @"3";

   label.font =[UIFont systemFontOfSize:16];

   label.textColor =[UIColor whiteColor];

   label.backgroundColor =[UIColor redColor];

   label.textAlignment = NSTextAlignmentCenter;

   label.layer.cornerRadius =8;

   label.layer.masksToBounds =YES;

   [tabBarController.tabBar addSubview:label];

    [labelrelease];

0 0