I have tried using the window event to detect change in focus:
nc.addObserver(forName: .init("NSWindowDidBecomeMainNotification"), object: nil, queue: nil) { notification in print("This window became focused:", notification.object!) self.turnoffConstraintForTextSideStack() }
This event posts on any of the open scenes changing focus, and my routine executes, changing the layout to Catalyst mode, then, in a few milliseconds, it changes itself back to the iOS configuration, so so redraw/relayout is occurring after my desired layout.
Can I stop the reversion to iOS layout? or failing that, How can I promote/push my layout to be final, after viewWillAppear?
Post
Replies
Boosts
Views
Activity
I appreciate your answer! I had actually tried your suggestion to use the window event but as per above, it triggered on any scene moving to front (actually not a terrible problem), and my constraints get manipulated, but then a few msec later, the layout gets redrawn and reverts to iOS. Any thoughts?
Thanks Frame! I’ll give it a try in the AM.
Sadly adding the -f flag in the framework.sh file Did Not work for me. I get exactly the same errors of unfound files.
Using Xcode 14.3 and Cocoapods 1.12.0. (1.12.1 not out yet)