Skip to content

Commit 788bdaf

Browse files
committed
Gridicons: Swift Mark 4 support
1 parent 15e518f commit 788bdaf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Gridicons/Gridicons/Gridicons.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,15 @@ public final class Gridicon: NSObject {
192192
}
193193

194194
/// - returns: A template image of the specified Gridicon type, at the default size.
195+
@objc
195196
public static func iconOfType(_ type: GridiconType) -> UIImage {
196197
return iconOfType(type, withSize: defaultSize)
197198
}
198199

199200
// These are two separate methods (rather than one method with a default argument) because Obj-C
200201

201202
/// - returns: A template image of the specified Gridicon type, at the specified size.
203+
@objc
202204
public static func iconOfType(_ type: GridiconType, withSize size: CGSize) -> UIImage {
203205
if let icon = cachedIconOfType(type, withSize: size) {
204206
return icon

GridiconsDemo/GridiconsDemo.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
TargetAttributes = {
115115
1704C20F1CAF0D7E00F991DE = {
116116
CreatedOnToolsVersion = 7.3;
117-
LastSwiftMigration = 0900;
117+
LastSwiftMigration = 0910;
118118
};
119119
};
120120
};
@@ -293,7 +293,7 @@
293293
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294294
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.GridiconsDemo;
295295
PRODUCT_NAME = "$(TARGET_NAME)";
296-
SWIFT_VERSION = 3.0;
296+
SWIFT_VERSION = 4.0;
297297
};
298298
name = Debug;
299299
};
@@ -305,7 +305,7 @@
305305
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
306306
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.GridiconsDemo;
307307
PRODUCT_NAME = "$(TARGET_NAME)";
308-
SWIFT_VERSION = 3.0;
308+
SWIFT_VERSION = 4.0;
309309
};
310310
name = Release;
311311
};

GridiconsDemo/GridiconsDemo/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ViewController: UIViewController {
3333
return types
3434
}()
3535

36-
var iconSize = CGSize(width: 24.0, height: 24.0)
36+
@objc var iconSize = CGSize(width: 24.0, height: 24.0)
3737

3838
override func viewDidLoad() {
3939
super.viewDidLoad()

0 commit comments

Comments
 (0)