![](/img/trans.png)
[英]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.