[英]iOS: “resizableImageWithCapInsets:” not stretching in tabBar
[英]tabbar icons stretching in UITabbar
我的标签栏图标大小为30x30。 当我将这些图标设置为选项卡时,图像将针对iPhone4和iPhone5屏幕尺寸进行拉伸。 为什么?
UINavigationController *hndWriteNav = [[UINavigationController alloc] initWithRootViewController:hndWrite];
hndWriteNav.tabBarItem.image = [UIImage imageNamed:@"browse.png"];
[hndWriteNav setTitle:@"Browse"];
[hndWrite release];
您需要创建两个单独的图标browser.png(30x30)和Browse@2x.png(60x60) 。
iOS会根据屏幕比例自动加载正确的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.