[英]tabbar icons stretching in UITabbar
I have tabbar icon size of 30x30. 我的标签栏图标大小为30x30。 When i set these icons to tabbar, images are stretching for iphone4 & iphone5 screen sizes.
当我将这些图标设置为选项卡时,图像将针对iPhone4和iPhone5屏幕尺寸进行拉伸。 Why?
为什么?
UINavigationController *hndWriteNav = [[UINavigationController alloc] initWithRootViewController:hndWrite];
hndWriteNav.tabBarItem.image = [UIImage imageNamed:@"browse.png"];
[hndWriteNav setTitle:@"Browse"];
[hndWrite release];
You need to create two separate icons browse.png (30x30) and browse@2x.png (60x60) . 您需要创建两个单独的图标browser.png(30x30)和Browse@2x.png(60x60) 。
iOS will automatically load the right file based on the screen scale. iOS会根据屏幕比例自动加载正确的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.