Skip to content

Commit 4516bc8

Browse files
Merge pull request #1274 from wordpress-mobile/issue/update_gridicons_to_1.0
Update gridicons to 1.0
2 parents f8808d3 + 4a9cf1d commit 4516bc8

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Example/Cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "Automattic/Gridicons-iOS" "0.18"
1+
github "Automattic/Gridicons-iOS" "1.0"

Example/Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "Automattic/Gridicons-iOS" "0.18"
1+
github "Automattic/Gridicons-iOS" "1.0"

Example/Example/EditorDemoController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ extension EditorDemoController {
994994
toolbar.dividerTintColor = .gray
995995
}
996996

997-
toolbar.overflowToggleIcon = Gridicon.iconOfType(.ellipsis)
997+
toolbar.overflowToggleIcon = .gridicon(.ellipsis)
998998
toolbar.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: 44.0)
999999
toolbar.autoresizingMask = [ .flexibleHeight ]
10001000
toolbar.formatter = self
@@ -1104,10 +1104,10 @@ extension EditorDemoController {
11041104

11051105
static var tintedMissingImage: UIImage = {
11061106
if #available(iOS 13.0, *) {
1107-
return Gridicon.iconOfType(.image).withTintColor(.label)
1107+
return UIImage.gridicon(.image).withTintColor(.label)
11081108
} else {
11091109
// Fallback on earlier versions
1110-
return Gridicon.iconOfType(.image)
1110+
return .gridicon(.image)
11111111
}
11121112
}()
11131113

@@ -1184,7 +1184,7 @@ extension FormattingIdentifier {
11841184

11851185
private func gridicon(_ gridiconType: GridiconType) -> UIImage {
11861186
let size = EditorDemoController.Constants.formatBarIconSize
1187-
return Gridicon.iconOfType(gridiconType, withSize: size)
1187+
return .gridicon(gridiconType, size: size)
11881188
}
11891189

11901190
var accessibilityIdentifier: String {

Example/Example/MediaInserter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class MediaInserter
7171
timer.invalidate()
7272
let message = NSAttributedString(string: "Upload failed!", attributes: attachmentTextAttributes)
7373
attachment.message = message
74-
attachment.overlayImage = Gridicon.iconOfType(.refresh)
74+
attachment.overlayImage = .gridicon(.refresh)
7575
}
7676
if progress.fractionCompleted >= 1 {
7777
timer.invalidate()

Example/Example/TextViewAttachmentDelegateProvider.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ class TextViewAttachmentDelegateProvider: NSObject, TextViewAttachmentDelegate {
4848
var placeholderImage: UIImage
4949
switch attachment {
5050
case _ as ImageAttachment:
51-
placeholderImage = Gridicon.iconOfType(.image, withSize: imageSize)
51+
placeholderImage = .gridicon(.image, size: imageSize)
5252
case _ as VideoAttachment:
53-
placeholderImage = Gridicon.iconOfType(.video, withSize: imageSize)
53+
placeholderImage = .gridicon(.video, size: imageSize)
5454
default:
55-
placeholderImage = Gridicon.iconOfType(.attachment, withSize: imageSize)
55+
placeholderImage = .gridicon(.attachment, size: imageSize)
5656
}
5757
if #available(iOS 13.0, *) {
5858
placeholderImage = placeholderImage.withTintColor(.label)
@@ -106,7 +106,7 @@ class TextViewAttachmentDelegateProvider: NSObject, TextViewAttachmentDelegate {
106106
let message = NSLocalizedString("Options", comment: "Options to show when tapping on a media object on the post/page editor.")
107107
attachment.message = NSAttributedString(string: message, attributes: attachmentTextAttributes)
108108
}
109-
attachment.overlayImage = Gridicon.iconOfType(.pencil, withSize: CGSize(width: 32.0, height: 32.0)).withRenderingMode(.alwaysTemplate)
109+
attachment.overlayImage = UIImage.gridicon(.pencil, size: CGSize(width: 32.0, height: 32.0)).withRenderingMode(.alwaysTemplate)
110110
textView.refresh(attachment)
111111
currentSelectedAttachment = attachment
112112
}

0 commit comments

Comments
 (0)