This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cls = "_UIAppearance" | |
var count: UInt32 = 0 | |
let properties = class_copyPropertyList(NSClassFromString(cls), | |
&count) | |
for i in 0..<Int(count) { | |
let property = properties![i] | |
let name = property_getName(property) | |
let nameString = NSString(cString: name, encoding: String.Encoding.utf8.rawValue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NSImage { | |
func makeImage(tintColor: NSColor) -> NSImage { | |
let image = copy() as! NSImage | |
image.lockFocus() | |
tintColor.set() | |
NSRectFillUsingOperation(NSMakeRect(0, 0, image.size.width, image.size.height), .sourceAtop) | |