for (int i = ; 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(/ * i + , (-)/, , );//4是按钮的个数;25是自己不断修改得来的.
[button addTarget:self action:@selector(selectedTab:) forControlEvents:UIControlEventTouchUpInside];
[_tabbarView addSubview:button];
}

效果如图:自定义的UITabbar上面的按钮的x坐标的计算方法-LMLPHP

04-28 19:33