Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't override the default UIBarButtonItem style #23

Closed
bastos opened this issue Dec 22, 2012 · 3 comments
Closed

I can't override the default UIBarButtonItem style #23

bastos opened this issue Dec 22, 2012 · 3 comments

Comments

@bastos
Copy link

bastos commented Dec 22, 2012

If I have a default UIBarButtonItem style in my .nss file and when I call [NUIAppearance init] I can't override those values using another class defined as runtime attribute on the Storyboard.

I've noticed that both NUIBarButtonItemRenderer and NUIAppearance are using setTitleTextAttributes but I could not find the reason why the NUIBarButtonItemRenderer is not overring the default value.

Example:

UIBarButtonItem {
  background-tint-color: @primaryBackgroundTintColor;
  font-name: @secondaryFontNameBold;
  font-color: @primaryFontColor;
  text-shadow-color: clear;
  font-size: 13;
}

MyMenuButton {
  font-color: #ff0000;
  text-shadow-color: clear;    
  font-size: 18;    
  background-tint-color: none;    
}
@tombenner
Copy link
Owner

This is fixed. Bar button items are rendered using UINavigationBar+NUI, and it had been using NUIRenderer instead of going through all of the NUI initialization methods in UIBarButtonItem+NUI, as it should. I've corrected that, and tested the issue you were seeing, and it seems to be working fine now.

The UIBarButtonItem style class has been replaced with BarButton, so you'll want to make that change in your NSS, too.

I'll close this, but if any aspect of it isn't working, just let me know!

@bastos
Copy link
Author

bastos commented Jan 26, 2013

Thanks, I'm gonna test it on future projects!

@trivektor
Copy link

Is there a way to remove the gloss effect for BarButton using NUI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants