Custom UITabBar background image not working in iOS 5 and later

后端 未结 5 2173
不思量自难忘°
不思量自难忘° 2020-12-01 11:13

I have a simple piece of code that places a background image on the tabBar.

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@         


        
5条回答
  •  庸人自扰
    2020-12-01 12:03

    There is something new in iOS 5 forBarMetrics:UIBarMetricsDefault

    Here is the apple doc on that

    [[UINavigationBar appearance] setBackgroundImage:toolBarIMG forBarMetrics:UIBarMetricsDefault];

提交回复
热议问题