1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 15:25:14 +03:00
vimr/VimR/CocoaExtensions.swift
2016-08-14 21:46:03 +02:00

19 lines
272 B
Swift

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Cocoa
extension NSButton {
var boolState: Bool {
get {
return self.state == NSOnState ? true : false
}
set {
self.state = newValue ? NSOnState : NSOffState
}
}
}