PWPolishedSlider
Language: Objective-C, Author: Collin Henderson
License: Public domain
This is a volume slider that looks like the slider from iTunes. Does not support ticked sliding.
PWPolishedSlider source preview
#import "PWPolishedSlider.h" #import "PWPolishedSliderCell.h" @implementation PWPolishedSlider + (Class)cellClass { return [PWPolishedSliderCell class]; } - initWithCoder: (NSCoder *)origCoder { if(![origCoder isKindOfClass: [NSKeyedUnarchiver class]]){ self = [super initWithCoder: origCoder]; } else { NSKeyedUnarchiver *coder = (id)origCoder; NSString *oldClassName = [[[self superclass] cellClass] className]; Class oldClass = [coder classForClassName: oldClassName]; if(!oldClass) oldClass = [[super superclass] cellClass]; [coder setClass: [[self class] cellClass] forClassName: oldClassName]; self = [super initWithCoder: coder]; [coder setClass: oldClass forClassName: oldClassName]; } return self; } @end
PWPolishedSlider header preview
/* PWPolishedSlider */ #import <Cocoa/Cocoa.h> @interface PWPolishedSlider : NSSlider { } @endDownload Archive
Compatible with:
- Mac OS X 10.4 PPC
- Mac OS X 10.4 Intel

I need to rename this because it does not have a prefix. It'd be great if you could give me one.
Why do you have to rename it? All you do is is add the four files plus graphics in to your project, and then when you make an NSSlider just go to custom class -> PolishedSlider
Because someone else may want to upload its own PolishedSlider (maybe even based on yours). Being in a flat namespace, there is the convention to prepend a 2 or more letters prefix to the name of each class to avoid collisions. Even Apple follows this prepending NS (for NextStep) to its own classes. Technically there is no reason for this, is just matter of being a good citizen.
Ah I thought you meant like a prefix file:P
Sorry about that, is there a way to just update the one i have uploaded or do I have to add a totally new file?
IF you have to do it yourself make the prefix PW (for PolishedWindow)
Unfortunately editing interface is not ready yet, I will do it manually without problems.
Thanks so much, sorry for the trouble!
Does this code happen to come from the iLifeControls framework?
It's based on it, yes, should have given you credit - I'll try and fix that - my apologies
No worries; I'm actually trying to get my hands out of the iLifeControls framework. It hasn't been updated in ages, and I have no plans for furthering it. I'll probably end up making it public domain, perhaps on Google Code.