Giter VIP home page Giter VIP logo

Comments (8)

mamaral avatar mamaral commented on August 31, 2024

I've tried to replicate this programmatically by presenting a modal view controller, but it works fine for me. Perhaps this is a segue/storyboard issue?

https://www.dropbox.com/s/u3obaxwhj1b2bb2/nav%20item.mov?dl=0

from mathemekit.

BtStSoft avatar BtStSoft commented on August 31, 2024

The issue only happens when using a text button bar item, not with system or image bar button items.
It is not storyboard related, tested it by adding a modal view to your demo project and adding a dismiss programmatically. Same effect!

https://www.dropbox.com/s/ycbah06bz8sctj5/MAThemeIssueDemo.mp4?dl=0

from mathemekit.

mamaral avatar mamaral commented on August 31, 2024

Ahh indeed.. Very weird. At first glance this looks like an OS bug, as my code isn't doing anything after viewDidLoad, so perhaps there's a bug in the appearance proxy methods.

from mathemekit.

BtStSoft avatar BtStSoft commented on August 31, 2024

Just found and fixed it!
The Button Appearance is set to the primary color.
It helps when I add this to the code:

#pragma mark - UI Navigation Bar Button
+(void)customizeNavigationBarButtonColor:(UIColor *)buttonColor {
[[UIButton appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleColor:buttonColor forState:UIControlStateNormal];
}

And in the method setupThemeWithPrimaryColor add this line after customizeNavigationBarColor:
[self customizeNavigationBarButtonColor:secondaryColor];

Text now also gets the textcolor when the button is contained in a UINavigationBar, even after being covered by a modal screen. Yay!

from mathemekit.

mamaral avatar mamaral commented on August 31, 2024

Very weird, thanks for that, I'll incorporate the fix in a moment.. It does seem to be an OS bug, in that you need to set both the line you added above as well as [[UINavigationBar appearance] setTintColor:buttonColor]; for the intended behavior to show.

from mathemekit.

mamaral avatar mamaral commented on August 31, 2024

17e0476 Should fix it. Let me know how that works.

from mathemekit.

BtStSoft avatar BtStSoft commented on August 31, 2024

Issue fixed! Thanks.

from mathemekit.

mamaral avatar mamaral commented on August 31, 2024

No, thank you!

from mathemekit.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.