Swift ios9 is there any fix for the UIViewControllerBasedStatusBarAppearance causing the error

I get the following error:

<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 

Looking back, this is apparently caused by:

UIViewControllerBasedStatusBarAppearance in Info.plist

Soruce: apple dev forum

When I read the stream, I see that the apple dev answers: - "You can ignore this warning."

But is there any fix for this other than removing the UIViewControllerBasedStatusBarAppearance from the Info.plist file? I need this so that my status bar is white in my VCs and I donโ€™t just want to ignore the warning.

+5
source share
1 answer

No. There is currently no reason for this. This is a mistake and will be fixed at some point in the future. As you say, you can ignore it, I would not waste time on it if I were you.

0
source

Source: https://habr.com/ru/post/1232057/


All Articles