Browse Source

设置swift 版本为5.0

jsonwang 3 years ago
parent
commit
75bf7218eb

+ 2 - 2
Example/BFFramework.xcodeproj/project.pbxproj

@@ -431,7 +431,7 @@
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_OBJC_BRIDGING_HEADER = "BFFramework-Demo-Bridging-Header.h";
 				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 			};
 			name = Debug;
 		};
@@ -452,7 +452,7 @@
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_OBJC_BRIDGING_HEADER = "BFFramework-Demo-Bridging-Header.h";
 				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 			};
 			name = Release;
 		};

+ 1 - 1
Example/BFFramework/ViewController.swift

@@ -14,7 +14,7 @@ class ViewController: UIViewController {
         super.viewDidLoad()
         view.backgroundColor = .white
 
-        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: UIBarButtonItemStyle.plain, target: self, action: Selector(("next:")))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: UIBarButtonItem.Style.plain, target: self, action: Selector(("next:")))
         let btn = UIButton(type: .contactAdd)
         btn.frame = CGRect(x: 100, y: 100, width: 100, height: 100)
         view.addSubview(btn)