Skip to content

Commit 8e93b6d

Browse files
committed
Merge branch 'release/1.1.5'
2 parents d081e18 + 42f794d commit 8e93b6d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LGButton.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'LGButton'
3-
s.version = '1.1.4'
3+
s.version = '1.1.5'
44
s.summary = 'A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.'
55
s.homepage = 'https://cocoapods.org/pods/LGButton'
66
s.license = { :type => 'MIT', :file => 'LICENSE.md' }

LGButton/Classes/LGButton.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ open class LGButton: UIControl {
363363
public var attributedString: NSAttributedString? {
364364
didSet {
365365
titleLbl.attributedText = attributedString
366-
}
366+
}
367367
}
368368

369369
// MARK: - Overrides
@@ -631,7 +631,7 @@ open class LGButton: UIControl {
631631
// MARK: - Xib file
632632
// MARK:
633633
fileprivate func xibSetup() {
634-
guard rootView == nil else { return }
634+
guard rootView == nil else { return }
635635
rootView = loadViewFromNib()
636636
rootView.frame = bounds
637637
rootView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
@@ -662,7 +662,6 @@ open class LGButton: UIControl {
662662
if !showTouchFeedback {
663663
return
664664
}
665-
666665
touchAlpha = (pressed) ? .touched : .untouched
667666
}
668667
}
@@ -672,11 +671,10 @@ open class LGButton: UIControl {
672671
}
673672

674673
override open func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?){
675-
let shouldSendActions = pressed
676-
pressed = false
677-
if shouldSendActions{
674+
if pressed {
678675
sendActions(for: .touchUpInside)
679676
}
677+
pressed = false
680678
}
681679

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

708706
@IBAction func tapAction(_ sender: Any) {
709-
let shouldSendActions = pressed
710-
pressed = false
711-
if shouldSendActions{
712-
sendActions(for: .touchUpInside)
707+
sendActions(for: .touchUpInside)
708+
if !isLoading {
709+
pressed = true
710+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
711+
self.pressed = false
712+
}
713713
}
714714
}
715715
}
File renamed without changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Icons are managed by [SwiftIconFont](https://github.com/0x73/SwiftIconFont) inte
4141

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

0 commit comments

Comments
 (0)