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

Programmatically rendered NUIButton doesn't seem to inherit classes #9

Closed
carterfort opened this issue Dec 7, 2012 · 2 comments
Closed

Comments

@carterfort
Copy link

This code:

[NUIRenderer renderButton:doneButton withClass:@"SmallButton"];

doesn't inherit the properties of Button, which I thought was the desired behavior.

I've tried different methods of naming the class using CSS conventions (i.e. Button.SmallButton, Button SmallButton, etc), and also using the class name itself NUISmallButton, but to no avail.

Is there a way to do this, or does this method only work in Interface Builder?

@tombenner
Copy link
Owner

You'll want to use @"Button:SmallButton". Sorry for the confusion there; this is mentioned in another context here, but I'll try to make it more obvious within the NUIRenderer usage documentation soon.

I also might consider adopted a different syntax, now that the stylesheet has become more and more CSS-like (it was a plist previously).

If you could let me know whether the above does indeed work (it should), that'd be great!

@carterfort
Copy link
Author

That works perfectly. Thanks, Tom.

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

2 participants