Update the readme to fix code sample
This commit is contained in:
parent
a3f30bafdc
commit
e59739b0e2
12
README.md
12
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 {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||||
// ...
|
// ...
|
||||||
if #available(iOS 13, *) {
|
if #available(iOS 13, *) {
|
||||||
window.rootViewController = UIHostingController(rootView: contentView)
|
window.rootViewController = UIHostingController(rootView: ContentView())
|
||||||
} else {
|
} else {
|
||||||
window.rootViewController = ViewController()
|
window.rootViewController = ViewController()
|
||||||
}
|
}
|
||||||
|
@ -290,11 +290,11 @@ class ViewController: UIViewController {
|
||||||
var label: UILabel = UILabel()
|
var label: UILabel = UILabel()
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
self.view.backgroundColor = .white
|
view.backgroundColor = .white
|
||||||
self.view.addSubview(label)
|
view.addSubview(label)
|
||||||
self.label.text = "Hello World iOS 12!"
|
label.text = "Hello World iOS 12!"
|
||||||
self.label.sizeToFit()
|
label.sizeToFit()
|
||||||
self.label.center = self.view.center
|
label.center = view.center
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue