Post

Replies

Boosts

Views

Activity

Comment on TableView editingStyle
If you wanted to remove from self.trades, you should: find what is the position in trades of the section/row you remove (it is NOT indexPath.row). Then remove it from self.trades. After that, recompute self.sections dictionary with self.sections = groupBySymbol.map {(Key, Value) in return sectionBySymbol(symbol: Key, trades: Value) }. So it is much simpler to update sections[indexPath.section].trades directly.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’22
Comment on Solve a set of equations
So you had seen the answer on SO, and seen the answer there was essentially same as mine: no generic solution to solving. Note: if you set one of the unknown, you will not explore the whole surface and will probably fall out of the intersection. But if that fits your needs, that's OK? Good luck.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’22
Comment on What is "focus"?
But doc describes how it is supposed to work. For instance: "In the following example of a simple login screen, when the user presses the Sign In button and one of the fields is still empty, focus moves to that field. Otherwise, the sign-in process proceeds."
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Comment on What is "focus"?
That what it says if you read just the first line. A field being edited is focused, a field may be focused without being edited. If you go through and make the effort to understand the examples, you will understand what they are. Sure, it is some effort, as for every learning… Good luck.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Comment on Working with Contractors
Working with someone since a year is not enough (in my mind) to create absolute trust… Can you meet them in person, not remotely ?
Replies
Boosts
Views
Activity
Apr ’22
Comment on TableView editingStyle
If you wanted to remove from self.trades, you should: find what is the position in trades of the section/row you remove (it is NOT indexPath.row). Then remove it from self.trades. After that, recompute self.sections dictionary with self.sections = groupBySymbol.map {(Key, Value) in return sectionBySymbol(symbol: Key, trades: Value) }. So it is much simpler to update sections[indexPath.section].trades directly.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Solve a set of equations
So you had seen the answer on SO, and seen the answer there was essentially same as mine: no generic solution to solving. Note: if you set one of the unknown, you will not explore the whole surface and will probably fall out of the intersection. But if that fits your needs, that's OK? Good luck.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Solve a set of equations
Once solved, what should the intersect func return ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Convert swift 2 to swift 4
If you don't see any difference between Swift 2 and Swift 5, you may have overlooked this ? https://github.com/apple/swift/blob/main/CHANGELOG.md
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Action sheet or alert to block user?
It's better, but would be even better with explicit info. Which is First report in your sum up ? Which are its actions ? What is Block alert ? etc…
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on "Failed to produce a diagnostic for expression; please file a bug report" error.
Thanks for feedback. You can test with @State var text = "vak", to see Text change when tapping button. Don't forget to close the thread.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on UITableView detailTextLabel equivalent in UIListContentConfiguration
Thanks, interesting information. But it would be so much better to have code snippets in the documentation.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on What is "focus"?
But doc describes how it is supposed to work. For instance: "In the following example of a simple login screen, when the user presses the Sign In button and one of the fields is still empty, focus moves to that field. Otherwise, the sign-in process proceeds."
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on What is "focus"?
That what it says if you read just the first line. A field being edited is focused, a field may be focused without being edited. If you go through and make the effort to understand the examples, you will understand what they are. Sure, it is some effort, as for every learning… Good luck.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on object lifetimes in swift
This may be an interesting read: https://stackoverflow.com/questions/68731011/when-is-deinit-exactly-called-in-swift
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on How can I change the progress bar value when another tab is selected?
Thanks for the feedback, and great to read your app works now. As you get the log (RAMBar nil), that means the crash is just after, on the second print.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on How to implement Search for Table
Thanks for the feedback. Note: you don't even need .searchable(text: $searchText). When TextField changes, State var searchText is changed, then body is reevaluated.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Recommendations on getting app to speak to driver
Thanks for the feedback. Don't forget to close the thread once you've got a correct answer. Good continuation.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Horizontally-Aligned TextField Wrap?
I edited my answer (first guess with TextField was wrong).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22