Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.718 kb
// LastifyDrawerButton.m
// Lastify
// Created by George on 11/02/2009.
// Based on code by Matt Gemmell:
#import "NSButton+Lastify.h"
@implementation NSButton (Lastify)
- (void)setTextColor:(NSColor *)textColor
NSMutableAttributedString *attrTitle = [[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTitle]];
int len = [attrTitle length];
NSRange range = NSMakeRange(0, len);
[attrTitle addAttribute:NSForegroundColorAttributeName value:textColor range:range];
[attrTitle fixAttributesInRange:range];
[self setAttributedTitle:attrTitle];
[attrTitle release];
Jump to Line
Something went wrong with that request. Please try again.