1. 程式人生 > >Status bar could not find cached time string image. Rendering in-process?解決

Status bar could not find cached time string image. Rendering in-process?解決

 

錯誤原因:
過程渲染的時候,IOS狀態列找不到快取的時間字串影象。
解決方法:

Product->Target-> Deployment Info -> 勾選’Hide status bar'

如果還是顯示該資訊可以在info.plist 設定View controller-based status bar appearance 設定為YES;

然後在用到該方法的viewcontroller中新增

- (void)viewDidAppear:(BOOL)animated{

 

[super viewDidAppear:animated];

if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {

[self prefersStatusBarHidden];

[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];

}

}

- (BOOL)prefersStatusBarHidden{

    return NO;

}