JDFPeekaboo icon indicating copy to clipboard operation
JDFPeekaboo copied to clipboard

iOS 10 issue

Open brightsider opened this issue 8 years ago • 3 comments

For iOS 10 has issue with status bar background - transparent when slowly expand navigation bar via scroll.

brightsider avatar Sep 12 '16 18:09 brightsider

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 avatar Oct 17 '16 11:10 JoeFryer

@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.

jlalvarez18 avatar Dec 28 '16 22:12 jlalvarez18

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?

JoeFryer avatar Jan 04 '17 22:01 JoeFryer