最后几天我尝试将 UITabBarItem 创建为 UIImage。但我只得到一个白色方块。我尝试使用 png 8、png 24、gif 和 jpg。图像会很喜欢,因为如果我将图像更改为更大的图像,白色方块也会更大。
这是我的代码:
UIBarButtonItem *selectFeed_3 = [[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"icon_20.png"]
style:UIBarButtonItemStyleBordered
target:self
action:@selector(changeFeed_3)
];
谢谢,诺斯特拉