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 navigationTitle with menu
Keep watching for changes after each beta release; the release notes show the main things but not everything. Browse through the documentation and look for the colour-coded APIs to see what's changed. I've found things that were released back in iOS 13 that I didn't know about.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’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 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 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 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 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 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 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 Sheet Presented From List Showing Incorrect Data
Note: the id property can be anything unique. I just chose a UUID as it is generally always unique.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on SwiftUI 4, IOS 16
I don't think there is a performance impact. The TabView is probably doing the same thing but also retaining each tab's view's state, as you mentioned below.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on error build: Cannot find 'NavigationStack' in scope
That macOS build is not a macOS build, but the iOS build that can run on macOS.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on error build: Cannot find 'NavigationStack' in scope
I am not having any of these problems. Running Xcode 14 RC on macOS 13.0 beta 7, targeting iOS and macOS.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on Missing argument for parameter #1 in call, Insert '<#LocalizedStringKey#,>'
The NavigationLink needs to be embedded anywhere inside a NavigationView.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on navigationTitle with menu
Keep watching for changes after each beta release; the release notes show the main things but not everything. Browse through the documentation and look for the colour-coded APIs to see what's changed. I've found things that were released back in iOS 13 that I didn't know about.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Comment on Alerts and Action Sheets not using SwiftUI accent color
You need to import SwiftUI or UIKit.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Comment on Picker Label not showing anymore
That's the new style in iOS 16. It makes it more obvious that it's a menu and aligns it more with macOS.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22