-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(button): add icon alone UIKit VitaminButton type, and refactor i…
…con management (#75) * feat(button) : add icon alone button type, and refactor icon management * feat(button) : add icon alone button type, and refactor icon management - swiftlint fixes * feat(button) : add icon alone button type - fix whitespaces in README * feat(button): add icon alone UIKit VitaminButton type - PR reviews Co-authored-by: Florent LOTTHÉ <[email protected]> * feat(button): add icon alone UIKit VitaminButton type - PR reviews Co-authored-by: Florent LOTTHÉ <[email protected]> Co-authored-by: Florent LOTTHÉ <[email protected]>
- Loading branch information
1 parent
5ef8e35
commit fd92229
Showing
5 changed files
with
260 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Sources/VitaminUIKit/Components/Button/VitaminButton+Deprecated.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// Vitamin iOS | ||
// Apache License 2.0 | ||
// | ||
|
||
import UIKit | ||
|
||
extension VitaminButton { | ||
@available(*, deprecated, message: "Use setIconType(:for:) instead") | ||
public func setLeadingImage(_ image: UIImage, for state: UIControl.State) { | ||
setIconType(.leading(image: image, renderingMode: nil), for: state) | ||
} | ||
@available(*, deprecated, message: "Use setIconType(:for:) instead") | ||
public func setTrailingImage(_ image: UIImage, for state: UIControl.State) { | ||
setIconType(.trailing(image: image, renderingMode: nil), for: state) | ||
} | ||
@available(*, deprecated, message: "Use setIconType(:for:) instead") | ||
public func setLeadingImage(_ image: UIImage, for state: UIControl.State, renderingMode: UIImage.RenderingMode) { | ||
setIconType(.leading(image: image, renderingMode: renderingMode), for: state) | ||
} | ||
@available(*, deprecated, message: "Use setIconType(:for:) instead") | ||
public func setTrailingImage(_ image: UIImage, for state: UIControl.State, renderingMode: UIImage.RenderingMode) { | ||
setIconType(.trailing(image: image, renderingMode: renderingMode), for: state) | ||
} | ||
} |
Oops, something went wrong.