Forum Xamarin.iOS

Change Status Bar color IOS 13

How can I change the status bar color on iOS 13 devices,
Previously I used this way but it seems it causes a crash on iOS 13 devices,

              var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
                if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
                {
                    statusBar.BackgroundColor = UIColor.FromRGB(0, 146, 71);
                    statusBar.TintColor = UIColor.White;
                }
Sign In or Register to comment.