Use BWToolkit through code instead of IB

I'm trying to use BWToolkit to make a HUD-style button. Since Xcode 4 doesn't support IB plugins, I'm forced to make this button through code. After importing the framework and importing the header, I tried this:

BWTransparentCheckbox *button = [[BWTransparentCheckbox alloc] initWithFrame:NSMakeRect(0, 0, 100, 20)];
[self addSubview:button]; 

I'd expect this nice-looking button:

button

However, this is what I get (minus the black border):

button

Any idea what I'm doing wrong here?

6
задан sudo rm -rf 15 March 2011 в 00:56
поделиться