Skip to content

Commit ae32676

Browse files
committed
Extract pencil icon to UIIMage+Woo
1 parent defeb6f commit ae32676

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

WooCommerce/Classes/Extensions/UIImage+Woo.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ extension UIImage {
3434
return UIImage(named: "gravatar")!
3535
}
3636

37+
/// Pencil Icon
38+
///
39+
static var pencilImage: UIImage {
40+
let tintColor = StyleManager.wooCommerceBrandColor
41+
return Gridicon.iconOfType(.pencil)
42+
.imageWithTintColor(tintColor)!
43+
.imageFlippedForRightToLeftLayoutDirection()
44+
}
45+
3746
/// Jetpack Logo Image
3847
///
3948
static var jetpackLogoImage: UIImage {

WooCommerce/Classes/ViewRelated/Orders/Cells/SummaryTableViewCell.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ private extension SummaryTableViewCell {
109109
}
110110

111111
func configureIcon() {
112-
let pencilIcon = Gridicon.iconOfType(.pencil)
113-
.imageWithTintColor(tintColor)?
114-
.imageFlippedForRightToLeftLayoutDirection()
115-
updateStatusButton.setImage(pencilIcon, for: .normal)
112+
updateStatusButton.setImage(.pencilImage, for: .normal)
116113

117114
updateStatusButton.addTarget(self, action: #selector(editWasTapped), for: .touchUpInside)
118115

0 commit comments

Comments
 (0)