Skip to content

Commit

Permalink
Frame update & action sender
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarGroth committed Aug 7, 2016
1 parent 121621a commit 7209e44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FlatButton.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'FlatButton'
s.version = '0.0.8'
s.version = '0.0.9'
s.summary = 'Layer based NSButton with Interface Builder styling options'
s.homepage = 'https://github.com/OskarGroth/FlatButton'
s.license = {
Expand Down
Binary file not shown.
7 changes: 6 additions & 1 deletion FlatButton/FlatButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public class FlatButton: NSButton {
setupTitle()
}
}
override public var frame: NSRect {
didSet {
setupTitle()
}
}

required public init?(coder: NSCoder) {
super.init(coder: coder)
Expand Down Expand Up @@ -163,7 +168,7 @@ public class FlatButton: NSButton {
if momentary {
setOn(state == NSOnState ? false : true)
}
target?.performSelector(action)
target?.performSelector(action, withObject: self)
mouseDown = false
}
}
Expand Down

0 comments on commit 7209e44

Please sign in to comment.