Problem With NSSliderCell

Discussion in 'Mac Programming' started by Blakeasd, Feb 12, 2011.

  1. Blakeasd macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    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:
    [​IMG]

    My image I am using as a knob is this:
    [​IMG]

    (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
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2

Share This Page