因此,当我自定义按钮时,我会放置这样的背景图像:
- (void) styleUIButtons {
UIImage *buttonNormalBg = [[UIImage imageNamed:@"button_normal" ] stretchableImageWithLeftCapWidth:0 topCapHeight:0];
UIImage *buttonSelectedBgb = [[UIImage imageNamed:@"button_selected" ] stretchableImageWithLeftCapWidth:0 topCapHeight:0];
id appereance = [UIButton appearance];
[appereance setTintColor:self.mainNavigationBarTextColor];
[appereance setBackgroundImage:buttonNormalBg forState:UIControlStateNormal];
[appereance setBackgroundImage:buttonSelectedBgb forState:UIControlStateHighlighted];
}
但是表格的披露指标可怕地变成了一行。为什么会这样?我该如何避免呢?我是否错误地自定义了按钮?