JDFPeekaboo
JDFPeekaboo copied to clipboard
iOS 10 issue
For iOS 10 has issue with status bar background - transparent when slowly expand navigation bar via scroll.
Hi @brightsider - you're right. Have you been able to find what's causing this? If you're able to investigate, that would be great. Otherwise I'll get to it at some point...
@JoeFryer I pin pointed the area where this is not working correctly on iOS 10. It apparently has to do with setting the titleTextAttributes
on the navigation bar with the updated alpha.
The workaround to updated the alpha on the nav bar title is:
if ([self.topView isKindOfClass:[UINavigationBar class]]) {
UINavigationBar *navigationBar = (UINavigationBar *)self.topView;
UINavigationItem *topItem = [navigationBar topItem];
UIView *titleView = [topItem titleView];
if (titleView != nil) {
titleView.alpha = alpha;
} else {
for (UIView *sub in navigationBar.subviews) {
if ([sub isKindOfClass:NSClassFromString(@"UINavigationItemView")]) {
for (UIView *aSub in sub.subviews) {
aSub.alpha = alpha;
}
}
}
}
}
The problem I see is if this will be accepted in the App Store since I'm checking for a private class.
You're right @jlalvarez18 - I found the same thing while investigating. Didn't think of that solution, but yeah, it's not App Store friendly, unfortunately. Any other ideas on a fix?