0

is it possible to assign a highres custom uitabbaritem image?

    UIImage *img;
    img = [UIImage imageNamed:@"TabIcon51@2x.png"];
    self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"more" image:img tag:5];

this doesnt work. is there a workaround, or even better an officel link / solution for this usecase?

thanks alex

Alex Milde
  • 511
  • 1
  • 7
  • 21

1 Answers1

0

If you're using imageNamed, you can exclude the @2x. The way imageNamed works is that if you're on a high res device it automatically loads the @2x file if it exists, otherwise it loads the regular file.

BarrettJ
  • 3,431
  • 2
  • 29
  • 26