From e59739b0e23f84dd3d07602d62b8d380c3cbda82 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 6 Dec 2019 22:51:11 +0800 Subject: [PATCH] Update the readme to fix code sample --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a6ef70b..cf0f1d6 100644 --- a/README.md +++ b/README.md @@ -278,7 +278,7 @@ platform :ios, '13.0' # This does not effect your App Target's deployment target func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // ... if #available(iOS 13, *) { - window.rootViewController = UIHostingController(rootView: contentView) + window.rootViewController = UIHostingController(rootView: ContentView()) } else { window.rootViewController = ViewController() } @@ -290,11 +290,11 @@ class ViewController: UIViewController { var label: UILabel = UILabel() override func viewDidLoad() { super.viewDidLoad() - self.view.backgroundColor = .white - self.view.addSubview(label) - self.label.text = "Hello World iOS 12!" - self.label.sizeToFit() - self.label.center = self.view.center + view.backgroundColor = .white + view.addSubview(label) + label.text = "Hello World iOS 12!" + label.sizeToFit() + label.center = view.center } }