From cbdd0745953eb9c8713657d34e26ead3945aa10a Mon Sep 17 00:00:00 2001 From: twof Date: Tue, 7 Aug 2018 11:08:45 -0700 Subject: [PATCH] further updates --- Example/Pods/Pods.xcodeproj/project.pbxproj | 4 ++-- Pod/Classes/XMSegmentedControl.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index d9f61bc..76b6fec 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -484,7 +484,7 @@ PRODUCT_NAME = XMSegmentedControl; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -588,7 +588,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Pod/Classes/XMSegmentedControl.swift b/Pod/Classes/XMSegmentedControl.swift index 3773fa0..9b8828f 100644 --- a/Pod/Classes/XMSegmentedControl.swift +++ b/Pod/Classes/XMSegmentedControl.swift @@ -304,7 +304,7 @@ open class XMSegmentedControl: UIView { let text: String = segmentContent.text[i] let halfSizeFont = UIFont(name: font.fontName, size: font.pointSize / 2.0) - let textSize = NSString(string: text).size(withAttributes: [NSAttributedStringKey.font: halfSizeFont]) + let textSize = NSString(string: text).size(withAttributes: [NSAttributedStringKey.font: halfSizeFont as Any]) let spacing: CGFloat = 12 let imageHorizontalInset: CGFloat = (width - imageSize.width)/2