iOS7 Tabbar icons too big

后端 未结 2 1170
不知归路
不知归路 2021-02-14 14:21

Seems I am having difficulty with something as simple as icons.

I am building an app for iOS7 only and thus, devices are retina displays (excluding iPad 2). So I made u

相关标签:
2条回答
  • 2021-02-14 14:29

    Keep 60x60px icons but rename them as iconName@2x.png which iOS will automatically reduce to 30x30 points, roughly to half of the original size on retina devices.

    If you are using assets catalogue, please make sure your icons are set to 2x icon sets.

    0 讨论(0)
  • 2021-02-14 14:34

    Or you can do something like this:

    UIImage *image = [UIImage imageNamed:@"1.jpg"];
    
    [image drawInRect:CGRectMake(0, 0, 30, 30)];
    
    first.tabBarItem.image = image;
    
    0 讨论(0)
提交回复
热议问题