Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Commit

Permalink
Conversion to swift 4 available by Xcode 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyohei Sakai committed Oct 9, 2017
1 parent 8438ea1 commit 1999ec1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
20 changes: 16 additions & 4 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions Example/SYBlinkAnimationKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -590,7 +590,8 @@
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -613,7 +614,8 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -635,7 +637,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SYBlinkAnimationKit_Example.app/SYBlinkAnimationKit_Example";
};
name = Debug;
Expand All @@ -654,7 +657,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SYBlinkAnimationKit_Example.app/SYBlinkAnimationKit_Example";
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Source/TextConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ extension TextConvertible where Self: UIView {
func configureTextLayer(_ text: String?, font: UIFont?, textColor: UIColor) {
guard let text = text, let font = font else { return }

let attributes = [NSFontAttributeName: font]
let attributes = [NSAttributedStringKey.font: font]

let size = text.size(attributes: attributes)
let size = text.size(withAttributes: attributes)
let origin = textPoint(ofSize: size)
let frame = CGRect(origin: origin, size: CGSize(width: size.width, height: size.height + layer.borderWidth))

Expand Down

0 comments on commit 1999ec1

Please sign in to comment.