Post

Replies

Boosts

Views

Activity

Comment on Why does custom Binding not update UI
The problem is that because you can't modify the contents of the class, you can't tell it to send change notifications which is what SwiftUI needs. I currently trying a way round this, possibly using Combine, but it's difficult without access to the original class (an extension can't do much). I'll update when I get somewhere but it'll either be ugly or not possible.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Comment on SwiftUI on macOS: double tap on list item
This new API is currently only available from macOS Ventura onwards. Previous versions will have to do without.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How to open settings programmatically in Swift
That is all the code you need. UIApplication.openSettingsURLString is a predefined string essentially provided to you by your app – you don't need to type it out yourself.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How to disable multiple TapGestures from being recognized simultaneously in SwiftUI
Which answer are you referring to?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Nothing Happens When Rotating An Image With Animation
The whole symbol image frame's centre isn't the same as the centre of the arrow (where you ideally want it to rotate around), if that makes sense. You can add .offset(y: -2) directly to the Image (before the other modifiers), and see if that works. Play around with the offset to get your desired value.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Nothing Happens When Rotating An Image With Animation
It's because "arrow.clockwise" hasn't got a square frame but "pencil" must have.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Why does custom Binding not update UI
The problem is that because you can't modify the contents of the class, you can't tell it to send change notifications which is what SwiftUI needs. I currently trying a way round this, possibly using Combine, but it's difficult without access to the original class (an extension can't do much). I'll update when I get somewhere but it'll either be ugly or not possible.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Upgrade Swift Playgrounds App to iOS 16
It worked for me, but I agree – there needs to be a picker to choose which iOS version to target.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on Hyperlinks open in Web browser instead of embedded WKWebView using Swift5/SwiftUI
If you mean comma, then no it doesn't. The commented part should be a boolean value of whether the URL should be opened in Safari. It's probably not clear enough in the sample code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on NavigationStack suggestions
This has always been the case since iOS 13.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on Calculation for a Picker
If that solved your problem, can you please mark that post as being correct, therefore closing this thread and letting everyone else know the issue has been resolved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on How to remove space before SwiftUI List Sections?
Not that I know of. I’m assuming you tried the iOS 15 solution on iOS 16?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Section collapse triangle for section header no longer supported with NavigationStack?
I think that’s only for Apple to see, so they can note or forward it on, as I can’t see others’ either.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Missing parameter error in the first couple of steps
Can you please close this thread by marking an answer as correct so that others know your issue has been solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Pass @Query filter predicate from parent view in SwiftData
Make sure your SWDItem and SWDPackage classes are both marked with the @Model macro. Also, you are force unwrapping item.package and maybe that is causing something, I'm not too sure. You might have to show some more code here because there isn't enough to debug the situation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on can't use @Environment for Binding?
Using @Bindable could be better as you would have to create this new Binding for every property you need to access. We are still in beta you must remember: things could change.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23