diff --git a/Example/DLRadioButtonExample.xcodeproj/project.pbxproj b/Example/DLRadioButtonExample.xcodeproj/project.pbxproj index 81d429c..e677e6a 100644 --- a/Example/DLRadioButtonExample.xcodeproj/project.pbxproj +++ b/Example/DLRadioButtonExample.xcodeproj/project.pbxproj @@ -156,6 +156,7 @@ ORGANIZATIONNAME = "Xingruo Liu"; TargetAttributes = { D1BE39FE19A7D263004BD3F5 = { + LastSwiftMigration = 1010; SystemCapabilities = { com.apple.DataProtection = { enabled = 0; @@ -343,6 +344,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; WRAPPER_EXTENSION = app; }; name = Debug; @@ -367,6 +369,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.liuxingruo.$(PRODUCT_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; + SWIFT_VERSION = 4.2; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/Example/DLRadioButtonExample/DemoViewController.swift b/Example/DLRadioButtonExample/DemoViewController.swift index accaf1a..43137ff 100644 --- a/Example/DLRadioButtonExample/DemoViewController.swift +++ b/Example/DLRadioButtonExample/DemoViewController.swift @@ -33,7 +33,7 @@ class DemoViewController : UIViewController { if (i > 1) { // put icon on the right side radioButton.isIconOnRight = true; - radioButton.contentHorizontalAlignment = UIControlContentHorizontalAlignment.right; + radioButton.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.right; } otherButtons.append(radioButton); i += 1; @@ -53,8 +53,8 @@ class DemoViewController : UIViewController { radioButton.setTitleColor(color, for: []); radioButton.iconColor = color; radioButton.indicatorColor = color; - radioButton.contentHorizontalAlignment = UIControlContentHorizontalAlignment.left; - radioButton.addTarget(self, action: #selector(DemoViewController.logSelectedButton), for: UIControlEvents.touchUpInside); + radioButton.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.left; + radioButton.addTarget(self, action: #selector(DemoViewController.logSelectedButton), for: UIControl.Event.touchUpInside); self.view.addSubview(radioButton); return radioButton;