Post

Replies

Boosts

Views

Activity

Reply to Switfui: change color in 'menu'
As far as I know you cannot change the styling for a menu item because the menu is displayed appropriately for the operating system it's running on. So, trying .foregroundColor(), .foregroundStyle(), .tint() etc. likely won't work. The only way you can make a menu item red is by giving the Button the destructive role. This, by default, makes the item red, but it may also have other side effects that you may not want: Button(role: .destructive) From the documentation: Use this role for a button that deletes user data, or performs an irreversible operation. A destructive button signals by its appearance that the user should carefully consider whether to tap or click the button. For example, SwiftUI presents a destructive button that you add with the swipeActions(edge:allowsFullSwipe:content:) modifier using a red background. So please, use it wisely. In the meantime, why not raise a feedback request, and ask for a way to tint a menu item? https://feedbackassistant.apple.com/
Topic: UI Frameworks SubTopic: SwiftUI
Nov ’25
Reply to iOS 26.1 and tabViewBottomAccessory
Okay, so in the meantime you could use something like this: public struct Conditional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var conditional: Conditional<Self> { Conditional(self) } } @ViewBuilder func showAccessory(_ enabled: Bool, accessoryContent: View) -> some View { if(enabled) { if #available(iOS 26.2, *) { content .tabViewBottomAccessory(isEnabled: enabled) { accessoryContent } } else { if #available(iOS 26.0, *) { content .tabViewBottomAccessory() { accessoryContent } } else { content } } } else { content } } // Use it like this: ... MyView { } .conditional.showAccessory(true /*or false*/, accessoryContent: MyAccessoryView()) Caveat: I have not tried this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to iOS 26.1 and tabViewBottomAccessory
From this thread: You'll want to use the new api tabViewBottomAccessory(isEnabled:content:), which allows you dynamically show and hide the view instead of an EmptyView. When isEnabled is true, the accessory view is shown, and when isEnabled is false, the view is hidden. Does that help?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to Get Out of Squircle Jail Free With InstallAware MP
These forums are not for advertising - as you have already been told. Please stop posting about your app on these forums. These forums are for developers to ask for hints and tips on coding, not for advertising apps. I have once again reported your post. No doubt you'll come back with some pointless response again, but you're in the wrong here, as you were last time.
Nov ’25
Reply to PAYMENT
Payment for what? If you want to pay for the Apple Developer Program, it should be in the "Account" section at the top of the page on these forums. And, why have you tagged your post with "Widgets & Live Activities"? Is this related to widgets and Live Activities or not? If not, please don't use unrelated tags on your posts.
Nov ’25
Reply to SwiftUI state is maddening
It just says ItemListView: _dismiss changed. in the console. I've put the code here: https://github.com/darkpawuk/DismissFail Just create a new iOS project in Xcode, remove the standard ContentView.swift and App.swft files, and drop these ones in. Runs on iOS 17 and above (because it uses @Observable).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to SwiftUI state is maddening
Oh, would you look at that? It's nothing at all to do with my variables. It's SwiftUI and these damned Environment variables. This time it was @Environment(\.dismiss) on the view that contains the List, not the rows inside the List. This is what is supposed to happen: The user taps a button in MainView. ItemsListView opens, which contains the List. The user does something in ListItemsView, such as deleting an Item. In order to close ItemsListView the user taps a button in that view, which merely calls dismiss(). dismiss() was used to avoid using a @State var in MainView and a corresponding @Binding var in ItemsListView. This should work, right? Wrong. What actually happens is this: The user taps a button in MainView. ItemsListView opens, which contains the List. The user swipes an ItemRow, then taps the delete button. The confirmation dialog appears, and is attached to the specific row. _dismiss is changed - for some reason - in ItemsListView, which causes the view to redraw, causing the List to redraw, causing every ItemRow to redraw, causing the confirmation dialog to disappear because the row it was attached to no longer exists. Obviously, the fix here is to revert to using @State and @Binding vars, and that does indeed work. So the question becomes: Why on Earth did dismiss change in ItemsListView? Your guess is as good as mine. 7 hours wasted.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to SwiftUI state is maddening
In MainApp I've tried creating the modelData variable with: // These two require ModelData to conform to ObservableObject, and vars must be marked with @Published: @StateObject private var modelData: ModelData = dataService.modelData @ObservedObject private var modelData: ModelData = dataService.modelData // This one uses @Observable instead, and vars aren't explicitly marked as @Published: @State private var modelData: ModelData = dataService.modelData // This is a simple let var: let modelData: ModelData = dataService.modelData In all four cases the entire list refreshes every time I swipe a row and press a button. In the case of the delete button, the confirmation dialog appears then disappears because the row changes. ObservableObject is the 'old' way of doing this, right? ModelData instead has the @Observable annotation. As stated earlier, the DataService is a singleton: DataService.swift: final class DataService { static let shared = DataService() private init() {} let coreData: CoreData = CoreData() let modelData: ModelData = ModelData() } Do I make the creation of the modelData variable here a @State variable instead of in MainApp? I'm really at a loss here. Nothing I try makes any difference. If Apple are listening, you really need to make this stuff easier to figure out and fix. Other IDEs will proactively warn you about code issues, but Xcode just lets you do anything, and doesn't help. The compiler can't even tell you where an error is in a thousand lines of code when you've typed a comma instead of a period. It's frustrating.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to SwiftUI state is maddening
This isn't even fine-tuning, this is just trying to get the entire List to stop being redrawn when something minor happens, end even when nothing has changed! Accessibility DWC hasn't changed, but SwiftUI thinks it has, and so the List redraws every row. I swipe one row and tap the edit button, the List jumps back to the top. No reason at all for that. Nothing has changed, but SwiftUI decides @self, @identity changed so it redraws every row. How did anything change? I didn't change the .id() of the rows - they use the id of the Item which has not changed. When this @State private var showDeleteConfirmation: Bool = false changes on one row because the user swiped and tapped the delete button, the entire List is redrawn. Why? I fear I'm going to end up with hundreds of stupid little hacks to get things to work, and they'll just fail on the next point release of the OS. And, as I've said on multiple occasions over the past week, across three other posts on this subject, this did not happen until iOS/iPadOS 26.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
Do you mean 'crashing'? Which version is 'iOS public beta'? Is it iOS 26.2 beta? Or is this the public beta before iOS 26 was first released in September? What code are you using, and what is the crash? You say you're using .glassEffect(_in:) but you don't give any actual values.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to iPhone/iPad iCloud is a piece of junk right now.
I don't know, but you're also in the wrong place. We're just third-party developers writing apps for Apple's platforms. We don't work for Apple, so posting your issue here isn't going to progress it. Just raise separate feedback reports for each individual issue - as you noted - and see if Apple can fix them.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Switfui: change color in 'menu'
As far as I know you cannot change the styling for a menu item because the menu is displayed appropriately for the operating system it's running on. So, trying .foregroundColor(), .foregroundStyle(), .tint() etc. likely won't work. The only way you can make a menu item red is by giving the Button the destructive role. This, by default, makes the item red, but it may also have other side effects that you may not want: Button(role: .destructive) From the documentation: Use this role for a button that deletes user data, or performs an irreversible operation. A destructive button signals by its appearance that the user should carefully consider whether to tap or click the button. For example, SwiftUI presents a destructive button that you add with the swipeActions(edge:allowsFullSwipe:content:) modifier using a red background. So please, use it wisely. In the meantime, why not raise a feedback request, and ask for a way to tint a menu item? https://feedbackassistant.apple.com/
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to iOS 26.1 and tabViewBottomAccessory
Okay, so in the meantime you could use something like this: public struct Conditional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var conditional: Conditional<Self> { Conditional(self) } } @ViewBuilder func showAccessory(_ enabled: Bool, accessoryContent: View) -> some View { if(enabled) { if #available(iOS 26.2, *) { content .tabViewBottomAccessory(isEnabled: enabled) { accessoryContent } } else { if #available(iOS 26.0, *) { content .tabViewBottomAccessory() { accessoryContent } } else { content } } } else { content } } // Use it like this: ... MyView { } .conditional.showAccessory(true /*or false*/, accessoryContent: MyAccessoryView()) Caveat: I have not tried this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to tabViewBottomAccessory AttributeGraph cycles, broken behavior of views participating in cycles
I couldn't work around the many issues with tabViewBottomAccessory, so I just decided not to use it at all. Maybe I'll revisit it in future, but right now, nah.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to iOS 26.1 and tabViewBottomAccessory
From this thread: You'll want to use the new api tabViewBottomAccessory(isEnabled:content:), which allows you dynamically show and hide the view instead of an EmptyView. When isEnabled is true, the accessory view is shown, and when isEnabled is false, the view is hidden. Does that help?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Get Out of Squircle Jail Free With InstallAware MP
These forums are not for advertising - as you have already been told. Please stop posting about your app on these forums. These forums are for developers to ask for hints and tips on coding, not for advertising apps. I have once again reported your post. No doubt you'll come back with some pointless response again, but you're in the wrong here, as you were last time.
Replies
Boosts
Views
Activity
Nov ’25
Reply to PAYMENT
Payment for what? If you want to pay for the Apple Developer Program, it should be in the "Account" section at the top of the page on these forums. And, why have you tagged your post with "Widgets & Live Activities"? Is this related to widgets and Live Activities or not? If not, please don't use unrelated tags on your posts.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Just paid to renew my subscription but still shows pending in revolut
Speak to Revolut?
Replies
Boosts
Views
Activity
Nov ’25
Reply to App review
Please stop using AI for simple things. There is widely available information on how the App Store review process works. You do not need to use AI to find that out. https://developer.apple.com/distribute/app-review/
Replies
Boosts
Views
Activity
Nov ’25
Reply to SwiftUI state is maddening
It just says ItemListView: _dismiss changed. in the console. I've put the code here: https://github.com/darkpawuk/DismissFail Just create a new iOS project in Xcode, remove the standard ContentView.swift and App.swft files, and drop these ones in. Runs on iOS 17 and above (because it uses @Observable).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to SwiftUI state is maddening
This happens on the Simulator only. Raised FB20880253.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to SwiftUI state is maddening
Oh, would you look at that? It's nothing at all to do with my variables. It's SwiftUI and these damned Environment variables. This time it was @Environment(\.dismiss) on the view that contains the List, not the rows inside the List. This is what is supposed to happen: The user taps a button in MainView. ItemsListView opens, which contains the List. The user does something in ListItemsView, such as deleting an Item. In order to close ItemsListView the user taps a button in that view, which merely calls dismiss(). dismiss() was used to avoid using a @State var in MainView and a corresponding @Binding var in ItemsListView. This should work, right? Wrong. What actually happens is this: The user taps a button in MainView. ItemsListView opens, which contains the List. The user swipes an ItemRow, then taps the delete button. The confirmation dialog appears, and is attached to the specific row. _dismiss is changed - for some reason - in ItemsListView, which causes the view to redraw, causing the List to redraw, causing every ItemRow to redraw, causing the confirmation dialog to disappear because the row it was attached to no longer exists. Obviously, the fix here is to revert to using @State and @Binding vars, and that does indeed work. So the question becomes: Why on Earth did dismiss change in ItemsListView? Your guess is as good as mine. 7 hours wasted.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to SwiftUI state is maddening
In MainApp I've tried creating the modelData variable with: // These two require ModelData to conform to ObservableObject, and vars must be marked with @Published: @StateObject private var modelData: ModelData = dataService.modelData @ObservedObject private var modelData: ModelData = dataService.modelData // This one uses @Observable instead, and vars aren't explicitly marked as @Published: @State private var modelData: ModelData = dataService.modelData // This is a simple let var: let modelData: ModelData = dataService.modelData In all four cases the entire list refreshes every time I swipe a row and press a button. In the case of the delete button, the confirmation dialog appears then disappears because the row changes. ObservableObject is the 'old' way of doing this, right? ModelData instead has the @Observable annotation. As stated earlier, the DataService is a singleton: DataService.swift: final class DataService { static let shared = DataService() private init() {} let coreData: CoreData = CoreData() let modelData: ModelData = ModelData() } Do I make the creation of the modelData variable here a @State variable instead of in MainApp? I'm really at a loss here. Nothing I try makes any difference. If Apple are listening, you really need to make this stuff easier to figure out and fix. Other IDEs will proactively warn you about code issues, but Xcode just lets you do anything, and doesn't help. The compiler can't even tell you where an error is in a thousand lines of code when you've typed a comma instead of a period. It's frustrating.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to SwiftUI state is maddening
This isn't even fine-tuning, this is just trying to get the entire List to stop being redrawn when something minor happens, end even when nothing has changed! Accessibility DWC hasn't changed, but SwiftUI thinks it has, and so the List redraws every row. I swipe one row and tap the edit button, the List jumps back to the top. No reason at all for that. Nothing has changed, but SwiftUI decides @self, @identity changed so it redraws every row. How did anything change? I didn't change the .id() of the rows - they use the id of the Item which has not changed. When this @State private var showDeleteConfirmation: Bool = false changes on one row because the user swiped and tapped the delete button, the entire List is redrawn. Why? I fear I'm going to end up with hundreds of stupid little hacks to get things to work, and they'll just fail on the next point release of the OS. And, as I've said on multiple occasions over the past week, across three other posts on this subject, this did not happen until iOS/iPadOS 26.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25