Skip to content

Commit db0bd1d

Browse files
committed
Removed custom init from ButtonActivityIndicator
1 parent a6df43f commit db0bd1d

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

WooCommerce/Classes/Extensions/UIButton+Helpers.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ extension UIButton {
176176
} else {
177177
DDLogWarn("""
178178
Failed attempt to pin button's title to the edges.
179-
This is likely because the custom button title label was not added to its view hierarchy
180-
See ButtonActivityIndicator as an example
179+
This is likely because the custom button title label was not added to its view hierarchy.
181180
"""
182181
)
183182
}

WooCommerce/Classes/ViewRelated/ReusableViews/ButtonActivityIndicator.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,6 @@ final class ButtonActivityIndicator: UIButton {
66

77
private let indicator: UIActivityIndicatorView = UIActivityIndicatorView(style: .medium)
88

9-
// We're adding the UILabel as subview in order to avoid a crash when
10-
// using large system fonts for accessibility. Trying to adapt the label
11-
// to its container will fail as these do not share ancestor
12-
// https://github.com/woocommerce/woocommerce-ios/pull/8094
13-
override init(frame: CGRect) {
14-
super.init(frame: frame)
15-
if let titleLabel {
16-
addSubview(titleLabel)
17-
}
18-
}
19-
20-
required init?(coder: NSCoder) {
21-
super.init(coder: coder)
22-
if let titleLabel {
23-
addSubview(titleLabel)
24-
}
25-
}
26-
279
override func layoutSubviews() {
2810
super.layoutSubviews()
2911

0 commit comments

Comments
 (0)