swiftui-multiplatform/ActionExtension-iOS/ActionViewController.swift

22 lines
546 B
Swift
Raw Permalink Normal View History

2021-11-19 20:41:54 +00:00
import SwiftUI
2021-11-05 19:12:04 +00:00
class ActionViewController: UIViewController {
2021-11-19 20:41:54 +00:00
let moc = LocalStorageManager.standard.container.viewContext
override var prefersStatusBarHidden: Bool { true }
2021-11-05 19:12:04 +00:00
override func viewDidLoad() {
super.viewDidLoad()
2021-11-19 20:41:54 +00:00
let contentView = ContentView()
.environment(\.extensionContext, extensionContext)
.environment(\.managedObjectContext, moc)
2021-11-05 19:12:04 +00:00
2021-11-19 20:41:54 +00:00
view = UIHostingView(rootView: contentView)
view.isOpaque = true
view.backgroundColor = .systemBackground
2021-11-05 19:12:04 +00:00
}
}