0
由於某些原因,當我將背景圖像應用於UIBarButtonItem時,它會使角尖銳的矩形。我怎樣才能解決這個使用UIAppearance?UIAppearance BarButtonItem with Rounded Corners
// 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)];
}