Post

Replies

Boosts

Views

Activity

Reply to document-based sample code doesn't work... work around?
Seems to be related to DocumentGroupLaunchScene. If I take that scene out entirely of their demo app, and just leave the DocumentGroup scene, the issue doesn't present. Happens in both iPhone and iPad simulators. I see a lot of console log noise with NSLayoutConstraint warnings. That seems like a hint here. Apple needs to issue a fix it seems. Xcode 16.1 / iOS 18.1
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to SwiftUI inspector full height
It appears the preview titlebar rendering may be incorrect / buggy. As a test, I put a rectangle in the inspector and it is consistent with the runtime behavior of filling only the under-titlebar area. It just seems like the preview is incorrectly rendering the titlebar as full-height, but the preview is not actually a full-height inspector. struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .toolbar { Text("test") } .inspector(isPresented: .constant(true)) { Rectangle().fill(.red) } } } Preview: Runtime:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to document-based sample code doesn't work... work around?
Seems to be related to DocumentGroupLaunchScene. If I take that scene out entirely of their demo app, and just leave the DocumentGroup scene, the issue doesn't present. Happens in both iPhone and iPad simulators. I see a lot of console log noise with NSLayoutConstraint warnings. That seems like a hint here. Apple needs to issue a fix it seems. Xcode 16.1 / iOS 18.1
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to SwiftUI inspector full height
It appears the preview titlebar rendering may be incorrect / buggy. As a test, I put a rectangle in the inspector and it is consistent with the runtime behavior of filling only the under-titlebar area. It just seems like the preview is incorrectly rendering the titlebar as full-height, but the preview is not actually a full-height inspector. struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .toolbar { Text("test") } .inspector(isPresented: .constant(true)) { Rectangle().fill(.red) } } } Preview: Runtime:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23