objective-c custom UITabBarItem @2x – Education Career Blog

is it possible to assign a highres custom uitabbaritem image?

    UIImage *img;
    img = UIImage imageNamed:@"[email protected]";
    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

,

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.

Leave a Comment