标签:
UIView *bgRight=[[UIView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2, 0, SCREEN_WIDTH/2, 35)];
bgRight.backgroundColor=[UIColor whiteColor];
[bgView addSubview:bgRight];
//gzz0121
UILabel *labSelvieR = [[UILabel alloc]initWithFrame:CGRectMake(0,11, 120, 20)];
labSelvieR.text = @"患者送花数";
labSelvieR.font = SYSTEMFONT(13);
labSelvieR.textColor = [UIColor blackColor];
labSelvieR.textAlignment=NSTextAlignmentLeft;
labSelvieR.backgroundColor=[UIColor clearColor];
[labSelvieR sizeToFit];//gzz0418
[bgRight addSubview:labSelvieR];
UILabel *labAmoutR = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(labSelvie.frame)+15,7, 50, 20)];
labAmoutR.text = [NSString stringWithFormat:@"%@",sendFlowerNumStr];
labAmoutR.font = SYSTEMFONT(13);
labAmoutR.textColor =BGCOLOR;
labAmoutR.textAlignment=NSTextAlignmentLeft;
[labAmoutR sizeToFit];
labAmoutR.centerY=labSelvieR.centerY;
[bgRight addSubview:labAmoutR];
CGFloat Centr=SCREEN_WIDTH/2-labSelvieR.width-labAmoutR.width-15;
CGFloat WidtddR=labSelvieR.width+labAmoutR.width+15;
bgRight.frame=CGRectMake(Centr/2+SCREEN_WIDTH/2, bgRight.y, WidtddR, bgRight.height);
标签:
原文地址:http://www.cnblogs.com/gzz2016/p/5403920.html