mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 23:36:08 +03:00
19 lines
272 B
Swift
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
|
||
|
}
|
||
|
}
|
||
|
}
|