出于某种原因,当我将背景图像应用到 UIBarButtonItem 时,它会使角变成锐利的矩形。如何使用 UIAppearance 解决这个问题?
// bar button
id barButtonAppearance = [UIBarButtonItem appearance];
[barButtonAppearance setBackgroundImage:[theme imageForBarButtonNormal] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
-(UIImage *) imageForBarButtonNormal
{
return [[UIImage imageNamed:@"bar_button_item_blue_background"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
}