Skip to content

Commit

Permalink
Example Conversion to Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ykws committed Nov 27, 2018
1 parent ddfd531 commit 813f923
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Example/DLRadioButtonExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
ORGANIZATIONNAME = "Xingruo Liu";
TargetAttributes = {
D1BE39FE19A7D263004BD3F5 = {
LastSwiftMigration = 1010;
SystemCapabilities = {
com.apple.DataProtection = {
enabled = 0;
Expand Down Expand Up @@ -343,6 +344,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Example/DLRadioButtonExample/DemoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 813f923

Please sign in to comment.