gpt4 book ai didi

ios - 在 UITabbar 中拉伸(stretch)的标签栏图标

转载 作者:行者123 更新时间:2023-11-29 10:50:37 25 4
gpt4 key购买 nike

我的标签栏图标大小为 30x30。当我将这些图标设置为标签栏时,图像会针对 iphone4 和 iphone5 屏幕尺寸进行拉伸(stretch)。为什么?

UINavigationController *hndWriteNav = [[UINavigationController alloc] initWithRootViewController:hndWrite];  
hndWriteNav.tabBarItem.image = [UIImage imageNamed:@"browse.png"];

[hndWriteNav setTitle:@"Browse"];
[hndWrite release];

最佳答案

您需要创建两个单独的图标 browse.png (30x30)browse@2x.png (60x60)

iOS 会根据屏幕比例自动加载正确的文件。

关于ios - 在 UITabbar 中拉伸(stretch)的标签栏图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20609489/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com