Post

Replies

Boosts

Views

Activity

Reply to Can't change time in Xcode Simulator
I have same issue while using fastlane snapshot. Based on Matt_PeakRidge's answer, here is my workaround. As my app only works with iOS 16 I couldn't use iOS 15.5 simulator. But iOS 16.0 worked so: Install iOS 16.0 simulator from Xcode Set deployment target to iOS 16.0 in Test scheme. In Snapfile file add ios_version("16.0").
Dec ’22
Reply to Offset on tap items when reopening app with a sheet open
After hours of tries I could find something interesting: if, in the sheet content, I add a button to dismiss the sheet, the bug doesn't appear anymore. But if I dismiss the sheet with finger (drag from top to bottom), it still appears.Here is modified code: struct ContentView: View { @State private var isOpen = false var body: some View { Button(action: { isOpen.toggle() }, label: { Text("Open sheet") .foregroundColor(.white) .padding() .background(.blue) }) .sheet(isPresented: $isOpen, content: { SheetContent() }) } } struct SheetContent: View { @Environment(\.dismiss) var dismiss var body: some View { Button(action: { dismiss() }, label: { Text("Dismiss sheet") }) } } It looks like there is something with calling (or not) the @Environment(\.dismiss) var dismiss. The current state is a bit better as few days ago as the bug only appears when user dismiss the sheet by dragging down. But there is still something wrong. Is there a way to programmatically call dismiss() when sheet is closed by dragging down?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Reply to Can't change time in Xcode Simulator
I have same issue while using fastlane snapshot. Based on Matt_PeakRidge's answer, here is my workaround. As my app only works with iOS 16 I couldn't use iOS 15.5 simulator. But iOS 16.0 worked so: Install iOS 16.0 simulator from Xcode Set deployment target to iOS 16.0 in Test scheme. In Snapfile file add ios_version("16.0").
Replies
Boosts
Views
Activity
Dec ’22
Reply to Offset on tap items when reopening app with a sheet open
After hours of tries I could find something interesting: if, in the sheet content, I add a button to dismiss the sheet, the bug doesn't appear anymore. But if I dismiss the sheet with finger (drag from top to bottom), it still appears.Here is modified code: struct ContentView: View { @State private var isOpen = false var body: some View { Button(action: { isOpen.toggle() }, label: { Text("Open sheet") .foregroundColor(.white) .padding() .background(.blue) }) .sheet(isPresented: $isOpen, content: { SheetContent() }) } } struct SheetContent: View { @Environment(\.dismiss) var dismiss var body: some View { Button(action: { dismiss() }, label: { Text("Dismiss sheet") }) } } It looks like there is something with calling (or not) the @Environment(\.dismiss) var dismiss. The current state is a bit better as few days ago as the bug only appears when user dismiss the sheet by dragging down. But there is still something wrong. Is there a way to programmatically call dismiss() when sheet is closed by dragging down?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22