Posts

Post not yet marked as solved
1 Replies
609 Views
I’ve got a Mac app with different kinds of windows. However, only Window1 is created on launch: import SwiftUI @main struct MyApp: App {   @SceneBuilder var body: some Scene {     Window1()     Window2()   } } struct Window1: Scene {   var body: some Scene {     WindowGroup {       Text("Window 1")         .padding(100)         .navigationTitle("Title 1")     }   } } struct Window2: Scene {   var body: some Scene {     WindowGroup {       Text("Window 2")         .padding(100)         .navigationTitle("Title 2")     }   } } How do we create a Window2? Is this even possible? Documentation is not clear in this regard. By the way, we have Settings window group on macOS. How does it work?
Posted
by Vadim.
Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
I’m running a Xcode 12.0 beta (12A6159) on macOS 10.15.5, and this looks like a bug: Open a project in Xcode Click a source file in the Navigator The source file is open in the Editor now Hit Control-Command-W to close the Editor 🐞 The Editor stays open Check the File menu, the Close Editor menu item is disabled I tried with both local source code files and SDK header files, it’s still disabled. Could you please confirm that this is a known issue? Thanks!
Posted
by Vadim.
Last updated
.
Post marked as solved
2 Replies
5.8k Views
This year’s WWDC session named “What’s New in Swift” has got the following sample code:let quantity = 10 let formatString = NSLocalizedString( "You have %lld apples", comment: "Number of apples" ) label.text = String(format: formatString, quantity)This is the first time ever when I meet “%lld” as a specifier for an integer value.So what is a recommended specifier for the “Swift.Int” type? Is it “%d” or “%lld” and why? Thanks in advance!
Posted
by Vadim.
Last updated
.