Post

Replies

Boosts

Views

Activity

Reply to Problem with TextFields and decimals iOS17
The only workaround that works for me is to remove the @Published property from a variable like so: import Foundation class TestFloatViewModel: ObservableObject { @Published var testFloat = TestFloat() } This is not ideal because the view is not updated if I need the view to update when this variable is updated (if I don' need this variable to control/impact view updates, then it is less of a problem). I applied this workaround because I need users to enter the data in a correct format, but I really don't understand why the original code is not working with iOS 17...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to Problem with TextFields and decimals iOS17
The only workaround that works for me is to remove the @Published property from a variable like so: import Foundation class TestFloatViewModel: ObservableObject { @Published var testFloat = TestFloat() } This is not ideal because the view is not updated if I need the view to update when this variable is updated (if I don' need this variable to control/impact view updates, then it is less of a problem). I applied this workaround because I need users to enter the data in a correct format, but I really don't understand why the original code is not working with iOS 17...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to Problem with TextFields and decimals iOS17
Apologies, the code above should read: import Foundation class TestFloatViewModel: ObservableObject { var testFloat = TestFloat() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to Problem with TextFields and decimals iOS17
I should add that this is not working when the Textfield is in .sheet or .fullScreenCover
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23