Post

Replies

Boosts

Views

Activity

Reply to PhotosPicker is not working properly
I cannot reproduce the Data error you are seeing. However, Xcode is complaining Argument passed to call that takes no arguments on your PhotosPicker( selection: $selectedItems, selectionBehavior: .ordered, matching: .images ) { Text("image!") } code. That is because you named your struct PhotosPicker as well, which is confusing the compiler.
Aug ’24
Reply to Is there a way to change the tint color of a TabView without affecting its subviews?
@Vision Pro Engineer Hey Sydney, Thanks for responding. I tried the advised approach, but discovered that the flickering issue happens on the inner tab's Swift Chart view. Specifically: On Xcode 15.4, setting the inner tab's tint color to a non-nil color behaves normally. However, setting it to .tint(nil) causes the chart to randomly switch between the default blue tint and the outer TabView's tint (in the above example, red color). On Xcode 16.0 betas, even setting the inner tab's tint to an explicit color causes flickering. In the above example, the chart would randomly switch between red and green. I have filed feedback FB14694434.
Aug ’24
Reply to Core Data crashes when attempting to establish relationship to an entity with derived attribute in the background
@DTS Engineer Thanks for your respsonse. I have filed feedback FB14508189. I was able to find a workaround by creating the background context as a child to the view context, in contrast to as a standalone context. I would then perform operations on this child context, save it, then save the view context. This seems to avoid the crash. Can you comment on the performance difference between this approach and saving on a standalone background context then wait for the system to auto merge changes to the view context?
Jul ’24
Reply to How to replace tabBar with bottomBar with smooth animation in SwiftUI?
@DTS Engineer Thank you for the example. In my app, TabView is the root view, and NavigationStack is nested within each Tab. I changed the provided example to match the structure of my app, and found that the animation issue was still present. Is this expected behavior? struct ContentView: View { @State private var isEditing = false var body: some View { TabView { Tab("Received", systemImage: "tray.and.arrow.down.fill") { NavigationStack { Button("toogle") { isEditing.toggle() } .toolbar(isEditing ? .hidden : .visible, for: .tabBar) .toolbar(isEditing ? .visible : .hidden, for: .bottomBar) .animation(.easeIn, value: isEditing) .toolbar { ToolbarItem(placement: .bottomBar) { Text("hello world") } } } } .badge(2) Tab("Sent", systemImage: "tray.and.arrow.up.fill") { Color.blue } Tab("Account", systemImage: "person.crop.circle.fill") { Color.green } .badge("!") } } }
Jul ’24