On appDidFinishLaunchingWithOptions, I tint my entire app red with the following code.
self.window.tintColor = [UIColor otfRedColor];
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
AthleteAdd *addAthlete = [self.storyboard instantiateViewControllerWithIdentifier:@"addAthlete"];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addAthlete];
addAthlete.delegate = self;
navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:navigationController animated:YES completion:nil];
MedicalReleaseVC *medRelease = [self.storyboard instantiateViewControllerWithIdentifier:@"showMedRel"];
medRelease.delegate = self;
[self presentViewController:medRelease animated:YES completion:nil];
self.window.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
I think this is a bug in iOS7's handling of
tintAdjustmentMode when opening and closing sheets and popovers. I've seen this bug happen in Apple's native mail app, where the bar button items become gray, or conversely, they no longer turn to gray once a popover shows up.
To debug this further, I suggest subclassing one of your views (or the window directly) and implementing
tintColorDidChange. Log the value of
tintAdjustmentMode there. I fear this is what is causing your gray tint issues.
One solution would be to force
UIViewTintAdjustmentModeNormal but this would have the effect of no dimming when opening a popover or a sheet.