Post

Replies

Boosts

Views

Activity

Reply to [Objective-C] Proper way of calling an overrided base interface method while using a category
Hi, Wanted to share a bit more context as it seems my question didn't come out in the right way. I'm using an library for building my applications(Qt). The library itself has defined an ApplicationDelegate and has member functions inside it to handle various lifecycle events. I want to override the Library's methods to execute my own code in the lifecycle events, to setup my application and then hand it back to the library's method to continue execution.
Jan ’22
Reply to [SwiftUI] Manipulating SwiftUI View Body during runtime
There is no error per se. My doubt is about how to dynamically use swiftui on the fly. To give an idea on the flow: // MyApp.swift import SwiftUI @main struct MyApp: App { let obj = MyWorkerClass () init ()     {         obj.callEntryPoint ()     } var body: some Scene {         WindowGroup { ContentView () } } } // ContentView.swift import SwiftUI struct ContentView: View { var body: some View {         VStack {             Image(systemName: "globe")                 .imageScale(.large)                 .foregroundColor(.accentColor)             Text("Hello, world!")         }         .padding()     } } // MyWorkerClass.swift class MyWorkerClass { func callEntyPoint () { // Switch to a worker thread and do some operations  DispatchQueue.global(qos: .background).async { // Once the operations are done, Show some UI change on the Main thread DispatchQueue.main.async { // Create a new Label on the screen } } } }
Feb ’23