From d9900ba783ee6aeeecb81f23153e5cffe9b8ced4 Mon Sep 17 00:00:00 2001 From: Mario Rosa Date: Fri, 5 Dec 2014 09:21:01 -0500 Subject: [PATCH] InAppBrowser, iOS: Setting setStatusBarStyle to -1 causes CGContextSaveGState. Simple if statement to ensure -1 is not submitted to setStatusBarStyle. --- src/ios/CDVInAppBrowser.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 4169b6e..6a1431a 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -441,7 +441,9 @@ self.inAppBrowserViewController = nil; if (IsAtLeastiOSVersion(@"7.0")) { - [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + if (_previousStatusBarStyle != -1) { + [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + } } _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7