Post

Replies

Boosts

Views

Activity

Reply to Navigation title flickers when tab is changed when used with a List / Form
Summary This is not a bug Closed Feedback Concept TabView needs to be the outermost container. NavigationStack should be in the Tab contents. Fixed Code struct ContentView: View { @State private var selectedTab = TabItem.red var body: some View { TabView(selection: $selectedTab) { ForEach(TabItem.allCases, id: \.self) { tab in Tab(tab.rawValue, systemImage: tab.systemImageName, value: tab) { NavigationStack { List { Text(tab.rawValue) } .navigationTitle(selectedTab.rawValue) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Dec ’25
Reply to #Predicate doesn't work with enum
I really hope this gets addressed in #WWDC25. Using a rawValue, you need to hardcode the rawValue, even the below wouldn't compile. #Predicate<Train> { $0.statusRawValue == Status.onTime.rawValue } Error: Key path cannot refer to enum case 'status' If the intent of SwiftData is to be modern and not expose the constraints of SQLite, then more needs to be done to improve support more swift types. Using a #Predicate seems like a blackbox, it works for simple primitive type comparisons but doesn't even work when trying to compare with something like Status.onTime.rawValue
May ’25
Reply to Need help understanding a piece of logic in a piece of code involving ".background"
dragDetector returns a GeometryReader which is a View You can look at the documentation for GeometryReader and Color.clear, both of them conform to View. I think it will be best to start simple by going through the basics of SwiftUI. There is great documentation / videos on Apple Developer website. Trying to learn SwiftUI by reading through code might not be the best approach, without the proper understanding of the basics of SwiftUI
Topic: Community SubTopic: Apple Developers Tags:
Aug ’24
Reply to MacOs sheet not opening and application stuck
Try to replace TrainingAttendanceView with a simple view (example: Color.red) and see what happens. If the sheet opens then the problem could be with TrainingAttendanceView, begin commenting out code till you isolate the problem. If the sheet doesn't open with a simple view then the problem could be in the parent view presenting it. After isolating the problem create a project with minimum code to reproduce the issue and then post it in the forum so that others can have a look.
Aug ’24
Reply to Updating a Core Data object does not update the SwiftUI view
CoreData Use @FetchRequest to keep CoreData in sync with SwiftUI view https://developer.apple.com/wwdc21/10017?time=581 SwiftData Use Query, to keep SwiftData in sync with your SwiftUI view. Please watch the WWDC videos on SwiftData to see how it is meant to be used with SwiftUI views. Reference: https://developer.apple.com/wwdc23/10154?time=330 https://developer.apple.com/documentation/swiftdata/query https://www.hackingwithswift.com/quick-start/swiftdata/how-to-use-query-to-read-swiftdata-objects-from-swiftui
Aug ’24
Reply to Drag and Drop using SwiftUI
Just tested this on macOS 15 and seems to work fine. I am able to drag single / multiple items from a list and drop it on to a different list cell. Note: I have not tested on Could you post the minimum code so that I can try to understand what the issue is.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’24
Reply to Navigation title flickers when tab is changed when used with a List / Form
This actually is a valid bug, so I have a created a new bug, This is a valid use case Please Apple Engineers, please do have a look at this New Feedback: FB21436493 Also I wish I could deleted my reply to this.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Navigation title flickers when tab is changed when used with a List / Form
Summary This is not a bug Closed Feedback Concept TabView needs to be the outermost container. NavigationStack should be in the Tab contents. Fixed Code struct ContentView: View { @State private var selectedTab = TabItem.red var body: some View { TabView(selection: $selectedTab) { ForEach(TabItem.allCases, id: \.self) { tab in Tab(tab.rawValue, systemImage: tab.systemImageName, value: tab) { NavigationStack { List { Text(tab.rawValue) } .navigationTitle(selectedTab.rawValue) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Tapping on ShareLink crashes the app
See attached Gif
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’25
Reply to List Section with Swipe Action - glitches
Thanks @j_salling, seems related. I have filed a feedback as well. It would be great to have this fixed at the earliest as possible as it affects production apps.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to List Section with Swipe Action - glitches
Following Gif shows the UI glitch
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to #Predicate doesn't work with enum
I really hope this gets addressed in #WWDC25. Using a rawValue, you need to hardcode the rawValue, even the below wouldn't compile. #Predicate<Train> { $0.statusRawValue == Status.onTime.rawValue } Error: Key path cannot refer to enum case 'status' If the intent of SwiftData is to be modern and not expose the constraints of SQLite, then more needs to be done to improve support more swift types. Using a #Predicate seems like a blackbox, it works for simple primitive type comparisons but doesn't even work when trying to compare with something like Status.onTime.rawValue
Replies
Boosts
Views
Activity
May ’25
Reply to Need help understanding a piece of logic in a piece of code involving ".background"
dragDetector returns a GeometryReader which is a View You can look at the documentation for GeometryReader and Color.clear, both of them conform to View. I think it will be best to start simple by going through the basics of SwiftUI. There is great documentation / videos on Apple Developer website. Trying to learn SwiftUI by reading through code might not be the best approach, without the proper understanding of the basics of SwiftUI
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftUI and focusedSceneValue on macOS, what am I doing wrong?
Passing a binding in a focusedSceneValue seems to work only when the app uses a WindowGroup. When the app uses a Window (single window) passing the binding in focusedSceneValue doesn't seem to work. When app uses Window focusedValue seems to work. Is this expected behaviour?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to MacOs sheet not opening and application stuck
Try to replace TrainingAttendanceView with a simple view (example: Color.red) and see what happens. If the sheet opens then the problem could be with TrainingAttendanceView, begin commenting out code till you isolate the problem. If the sheet doesn't open with a simple view then the problem could be in the parent view presenting it. After isolating the problem create a project with minimum code to reproduce the issue and then post it in the forum so that others can have a look.
Replies
Boosts
Views
Activity
Aug ’24
Reply to Updating a Core Data object does not update the SwiftUI view
CoreData Use @FetchRequest to keep CoreData in sync with SwiftUI view https://developer.apple.com/wwdc21/10017?time=581 SwiftData Use Query, to keep SwiftData in sync with your SwiftUI view. Please watch the WWDC videos on SwiftData to see how it is meant to be used with SwiftUI views. Reference: https://developer.apple.com/wwdc23/10154?time=330 https://developer.apple.com/documentation/swiftdata/query https://www.hackingwithswift.com/quick-start/swiftdata/how-to-use-query-to-read-swiftdata-objects-from-swiftui
Replies
Boosts
Views
Activity
Aug ’24
Reply to Swift compiler crash with Xcode 16 beta 5
After updating to macOS 15 Beta 6, I am able to open Xcode 15 Beta 5 and it doesn't crash. You could it try after updating the OS to macOS 15 Beta 6.
Replies
Boosts
Views
Activity
Aug ’24
Reply to Swift compiler crash with Xcode 16 beta 5
For me Xcode 16 beta 5 crashes when I open it on macOS 15 beta 5 Xcode: Xcode 16 beta 5 macOS: macOS 15 beta 5 Thanks for filing the feedback, I hope this gets fixed as Xcode is unusable.
Replies
Boosts
Views
Activity
Aug ’24
Reply to Drag and Drop using SwiftUI
Just tested this on macOS 15 and seems to work fine. I am able to drag single / multiple items from a list and drop it on to a different list cell. Note: I have not tested on Could you post the minimum code so that I can try to understand what the issue is.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to XCTest - addUIInterruptionMonitor not working on iOS 17
I am facing a similar issue with contacts permission on iOS 17 and iOS 16.4 @Developer Tools Engineer @eskimo FB13635680
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to SwiftUI slider in accessibilityRepresentation & XCUITest slider's normalizedSliderPosition
@sasro I am stuck with the exact same problem. Did you manage to solve this issue? If so how?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’23