Ios7 第一次未加载的UI外观图像

Ios7 第一次未加载的UI外观图像,ios7,uinavigationcontroller,uibarbuttonitem,uiappearance,Ios7,Uinavigationcontroller,Uibarbuttonitem,Uiappearance,我刚开始将UIAppearance添加到我的项目中,却被uibarbuttonims卡住了: - (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [

我刚开始将
UIAppearance
添加到我的项目中,却被
uibarbuttonims
卡住了:

- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal];
    [[UIBarButtonItem appearance] setBackButtonBackgroundImage:[[UIImage imageNamed:@"UIBarButtonItemBack"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 2, 0, 13)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[JWViewController alloc] initWithNibNam:@"JWViewcontroller" bundle:nil]];
    [self.window makeKeyAndVisible];
    return YES;
}
当我打开应用程序并单击tableViewCell时,navigationController会推入另一个viewController,并显示一个返回按钮,该按钮为白色文本颜色,没有背景图像。当我按下按钮时,背景图像出现,当我取消触摸时,背景图像就在那里。当我实际返回到第二个视图时,它也出现了


这是iOS 7上的一个已知问题,或者你能想象有什么解决办法吗?

这里也有同样的问题。似乎调用setNeedsDisplay显式地完成了这个任务

我将这些行添加到需要修复的视图控制器的viewwillappease/viewDidLoad(etc)中:

dispatch_async(dispatch_get_main_queue(), ^{
    [[self.navigationController.navigationBar subviews] makeObjectsPerformSelector:@selector(setNeedsDisplay)];
});
已知问题;看见一个选择是丢弃背景图像(无论如何,这更像是iOS7),或者在链接处有一个补丁,您可以使用它来修复它。