-
Notifications
You must be signed in to change notification settings - Fork 461
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
UIButton background color blending #339
Comments
This talks about solving that very problem (for UIButton). However, that capability is not yet finished to the point where it may be merged back into this repo; but I have successfully used that code in a few apps of mine running in production. Hopefully, that may suffice for the time being. |
Having custom blocks for styles is ok, but I think this particular situation should be working out of a box. |
Background color can be set on UIView instances from .nss file. The color transparency blending issue isn't the only problem as it boils down to a lack of a If you have a good idea for what the default behavior should be, I'd be happy to hear it. But it is important to realize people will expect it to more-or-less work out of the box. And although the current solution isn't ideal, it does manage to make the most of what we have access to; all while preventing overly unexpected behavior. |
As I said, reset backgroundColor to clear color in NUIButtonRenderer, if background-color related properties have any value |
Sure, that's a band aid fix, but you are still going to notice the color Since I take it your are currently experiencing this issue and can readily
|
Hmm, now I'm not sure if I understood you correctly before. What do you mean by color tinting hack being slightly off? From what I see NUIConverter creates UIImage based on the color you specify in nss file and then NUIButtonRenderer uses it as a background image in UIButton. Is there something I missed? As for me, I just made a workaround by setting background color as clear in my xib files. |
Might be related to this issue
When you have a button with defined non-clear backgroundColor (for example in interface builder), any background-color style with translucency will be blending with it, which is undesired.
Possible solutions might be reseting backgroundColor to clear in NUIButtonRenderer or give user opportunity to set backgroundColor of a view in .nss file.
The text was updated successfully, but these errors were encountered: