1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00
vimr/VimR/CocoaExtensions.swift

19 lines
272 B
Swift
Raw Normal View History

2016-08-14 22:46:03 +03:00
/**
* 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
}
}
}