Commit 6612bfd0 by Daniel Dahan

issue-973: Fixed issue where Button.prepare was not being called in the correct order.

parent 6f9f6ca9
......@@ -4,6 +4,7 @@
* [issue-982](https://github.com/CosmicMind/Material/issues/982): Updated Icon let declarations to var declarations to allow custom icon sets.
* [issue-980](https://github.com/CosmicMind/Material/issues/980): Added `@objc` to extension properties in Material+UIView.
* [issue-650](https://github.com/CosmicMind/Material/issues/650): Fixed issue where `NavigationBar.backButton` would incorrectly be laid out when caching view controllers.
* [issue-973](https://github.com/CosmicMind/Material/issues/973): Fixed issue where `Button.prepare` was not being called in the correct order.
## 2.12.16
......
......@@ -198,9 +198,10 @@ open class Button: UIButton, Pulseable, PulseableLayer {
- Parameter image: A UIImage.
- Parameter tintColor: A UI
*/
public convenience init(image: UIImage?, tintColor: UIColor = Color.blue.base) {
self.init()
public init(image: UIImage?, tintColor: UIColor = Color.blue.base) {
super.init(frame: .zero)
prepare(with: image, tintColor: tintColor)
prepare()
}
/**
......@@ -208,9 +209,10 @@ open class Button: UIButton, Pulseable, PulseableLayer {
- Parameter title: A String.
- Parameter titleColor: A UI
*/
public convenience init(title: String?, titleColor: UIColor = Color.blue.base) {
self.init()
public init(title: String?, titleColor: UIColor = Color.blue.base) {
super.init(frame: .zero)
prepare(with: title, titleColor: titleColor)
prepare()
}
open override func layoutSubviews() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment