Skip to content

Commit

Permalink
Added swiftlint phase
Browse files Browse the repository at this point in the history
  • Loading branch information
ldiqual committed Oct 23, 2016
1 parent 23657cd commit 873ec66
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
disabled_rules:
- line_length
- trailing_whitespace
included:
- SwiftyButton/
17 changes: 17 additions & 0 deletions SwiftyButton.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
isa = PBXNativeTarget;
buildConfigurationList = C0F04E131BFA83F700E9925E /* Build configuration list for PBXNativeTarget "SwiftyButton" */;
buildPhases = (
C09D784C1DBD42AF0014565F /* ShellScript */,
C0F04E061BFA83F700E9925E /* Sources */,
C0F04E071BFA83F700E9925E /* Frameworks */,
C0F04E081BFA83F700E9925E /* Headers */,
Expand Down Expand Up @@ -145,6 +146,22 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
C09D784C1DBD42AF0014565F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
C0F04E061BFA83F700E9925E /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
4 changes: 2 additions & 2 deletions SwiftyButton/SwiftyButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ open class SwiftyButton: UIButton {
let highlightedImage = Utils.highlightedButtonImage(color: highlightedColor ?? buttonColor, shadowHeight: shadowHeight, shadowColor: shadowColor, cornerRadius: cornerRadius, buttonPressDepth: buttonPressDepth)
let disabledImage = Utils.buttonImage(color: disabledButtonColor, shadowHeight: shadowHeight, shadowColor: disabledShadowColor, cornerRadius: cornerRadius)

setBackgroundImage(normalImage, for: .normal)
setBackgroundImage(normalImage, for: .normal)
setBackgroundImage(highlightedImage, for: .highlighted)
setBackgroundImage(disabledImage, for: .disabled)
setBackgroundImage(disabledImage, for: .disabled)
}
}
2 changes: 1 addition & 1 deletion SwiftyButton/SwiftyCustomContentButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ open class SwiftyCustomContentButton: SwiftyButton {

public let customContentView = UIView()

private var customContentViewTopConstraint: NSLayoutConstraint?
private var customContentViewTopConstraint: NSLayoutConstraint?
private var customContentViewBottomConstraint: NSLayoutConstraint?

// @hack Intercept all touches on subviews
Expand Down

0 comments on commit 873ec66

Please sign in to comment.