I have a view controller I am presenting modally. I want the status bar color to match the navigation bar color.
I have set UIViewControllerBasedStatusBarAppearance to YES because I don't want this change across the entire application.
I am setting self.navigationController.navigationBar.barTintColor but this is only changing the navigation bar color. The status bar remains a lighter color.
I have tried various combinations of setNeedsStatusBarAppearanceUpdate and preferredStatusBarStyle but none have any effect.
View controller is launched like so:
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:searchController];
navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:navigationController animated:YES completion:nil];