Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
Hello,
I am trying to create an HUD slider. I know about the BWToolkit, but my version of Xcode does not support it. This is what it looks like when I run my code:
Screenshot2011-02-12at85747PM.png


My image I am using as a knob is this:
Screenshot2011-02-12at90153PM.png


(This gray area around it is the preview app)

Here is my code:
Code:
#import "Custom Slider.h"


@implementation Custom_Slider
@synthesize knobImage;
-(void)awakeFromNib{

self.knobImage = [NSImage imageNamed:@"sliderImage"];
}

-(void)drawKnob:(NSRect)knobRect{
    [[NSColor clearColor] set];
    NSRectFill(knobRect);
    [knobImage compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver];


}


@end

Why is this happening?
Please Help
Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.