Skip to content

Commit

Permalink
Merge branch 'release/1.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
loregr committed Feb 18, 2019
2 parents d081e18 + 42f794d commit 8e93b6d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion LGButton.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'LGButton'
s.version = '1.1.4'
s.version = '1.1.5'
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
20 changes: 10 additions & 10 deletions LGButton/Classes/LGButton.swift
Expand Up @@ -363,7 +363,7 @@ open class LGButton: UIControl {
public var attributedString: NSAttributedString? {
didSet {
titleLbl.attributedText = attributedString
}
}
}

// MARK: - Overrides
Expand Down Expand Up @@ -631,7 +631,7 @@ open class LGButton: UIControl {
// MARK: - Xib file
// MARK:
fileprivate func xibSetup() {
guard rootView == nil else { return }
guard rootView == nil else { return }
rootView = loadViewFromNib()
rootView.frame = bounds
rootView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
Expand Down Expand Up @@ -662,7 +662,6 @@ open class LGButton: UIControl {
if !showTouchFeedback {
return
}

touchAlpha = (pressed) ? .touched : .untouched
}
}
Expand All @@ -672,11 +671,10 @@ open class LGButton: UIControl {
}

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

override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?){
Expand Down Expand Up @@ -706,10 +704,12 @@ open class LGButton: UIControl {
}

@IBAction func tapAction(_ sender: Any) {
let shouldSendActions = pressed
pressed = false
if shouldSendActions{
sendActions(for: .touchUpInside)
sendActions(for: .touchUpInside)
if !isLoading {
pressed = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.pressed = false
}
}
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -41,7 +41,7 @@ Icons are managed by [SwiftIconFont](https://github.com/0x73/SwiftIconFont) inte

| Collection | Font name | Cheat Sheet |
|--------------|--------|-------------------------------------------|
| Font Awesome | fa | [List](http://fontawesome.io/cheatsheet/) |
| Font Awesome | fa | [List](https://fontawesome.com/v4.7.0/icons/) |
| Ion Icons | io | [List](http://ionicons.com) |
| Octicons | oc | [List](https://octicons.github.com) |
| Open Iconic | ic | [List](https://useiconic.com/open/) |
Expand Down

0 comments on commit 8e93b6d

Please sign in to comment.