标签:style blog class code java tar
for (int i = 0; i < 4; i++) {//4是按钮的个数 NSString *backImage = backgroud[i]; NSString *heightImage = heightBackground[i]; UIButton *button = [UIFactory createButton:backImage highlighted:heightImage]; button.showsTouchWhenHighlighted = YES; button.frame = CGRectMake(320/ 4 * i + 25, (49-30)/2, 30, 30);//4是按钮的个数;25是自己不断修改得来的. [button addTarget:self action:@selector(selectedTab:) forControlEvents:UIControlEventTouchUpInside]; [_tabbarView addSubview:button]; }
效果如图:
自定义的UITabbar上面的按钮的x坐标的计算方法,布布扣,bubuko.com
标签:style blog class code java tar
原文地址:http://www.cnblogs.com/hw140430/p/3714321.html