Skip to content

Commit

Permalink
Merge branch 'release/1.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
loregr committed Jan 29, 2019
2 parents 96b46dc + e2dbf93 commit 22b5295
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LGButton.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'LGButton'
s.version = '1.1.2'
s.version = '1.1.3'
s.summary = 'A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.'
s.homepage = 'https://cocoapods.org/pods/LGButton'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
Expand Down
18 changes: 9 additions & 9 deletions LGButton/Classes/LGButton.swift
Expand Up @@ -10,7 +10,7 @@ import QuartzCore


@IBDesignable
public class LGButton: UIControl {
open class LGButton: UIControl {

enum TouchAlphaValues : CGFloat {
case touched = 0.7
Expand Down Expand Up @@ -382,7 +382,7 @@ public class LGButton: UIControl {
setupView()
}

override public func layoutSubviews() {
override open func layoutSubviews() {
if gradient != nil {
gradient?.removeFromSuperlayer()
gradient = nil
Expand All @@ -391,19 +391,19 @@ public class LGButton: UIControl {
setupBorderAndCorners()
}

override public func awakeFromNib() {
override open func awakeFromNib() {
super.awakeFromNib()
xibSetup()
setupView()
}

override public func prepareForInterfaceBuilder() {
override open func prepareForInterfaceBuilder() {
super.prepareForInterfaceBuilder()
xibSetup()
setupView()
}

override public var intrinsicContentSize: CGSize {
override open var intrinsicContentSize: CGSize {
return CGSize(width: 10, height: 10)
}

Expand Down Expand Up @@ -667,19 +667,19 @@ public class LGButton: UIControl {
}
}

override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
pressed = true
}

override public func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?){
override open func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?){
let shouldSendActions = pressed
pressed = false
if shouldSendActions{
sendActions(for: .touchUpInside)
}
}

override public func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?){
override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?){
if let touchLoc = touches.first?.location(in: self){
if (touchLoc.x < -touchDisableRadius ||
touchLoc.y < -touchDisableRadius ||
Expand All @@ -693,7 +693,7 @@ public class LGButton: UIControl {
}
}

override public func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
override open func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
pressed = false
}

Expand Down

0 comments on commit 22b5295

Please sign in to comment.