Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Oh ok it's a Mac App, I've never tried sorry.mine is iOS, and instanciating in the SceneDelegate class, it works just fineimport UIKit
import SwiftUI
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.rootViewController = UIHostingController(rootView: ContentView(testObject: TestClass())). // Instanciation
self.window = window
window.makeKeyAndVisible()
}
}Perhaps I'll try a MacApp tomorrow and let you know, in France it's already the beginning of the night 😉