Post

Replies

Boosts

Views

Activity

Comment on Array drop
You're welcome, the forum is precisely for this. What is misleading is that drop is not "drop where" but "drop while". The expended form makes it clearer: let newarr = arr.drop (while: { exc.contains($0) } )
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’23
Comment on Array drop
You're welcome, the forum is precisely for this. What is misleading is that drop is not "drop where" but "drop while". The expanded form makes it clearer: let newarr = arr.drop (while: { exc.contains($0) } )
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’23
Comment on Does Swift has a string builder class?
Sure, it does not equate. But each language has its own optimisations relative to Strings handling (and there are many). Are you sure that those other languages do not create an interim String when using appendFormat ? In anycase, form developer point of view, creating an intermediate String is not an issue (unless I missed something).
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’23
Comment on Can Appstore apps have subscriptions which automatically reduce after a set period of user loyalty?
I don't think you are eligible on a free account.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Cannot find ContentVIew() in scope
@Aor1105 Where exactly do you get the error message ? The code you posted is not structured as @hieuleuxuan advised. So what is your current code ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Failed to prepare the device for development
Thanks for the feedback. Don't forget to marked my answer as correct to close the thread. Good continuation.
Replies
Boosts
Views
Activity
Aug ’23
Comment on iPad UIScaling
For unknown reason, the screenshots do not show…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Array drop
You're welcome, the forum is precisely for this. What is misleading is that drop is not "drop where" but "drop while". The expended form makes it clearer: let newarr = arr.drop (while: { exc.contains($0) } )
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Array drop
You're welcome, the forum is precisely for this. What is misleading is that drop is not "drop where" but "drop while". The expanded form makes it clearer: let newarr = arr.drop (while: { exc.contains($0) } )
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Alpha Value of UIButton set in a storyboard is reset on Light/Dark Mode Transition
That may be interesting to share code.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Mystery Inverted Bool
Question in fact: why do you even need Dispatch ? If I understand your code, you are alre in the main queue. So try remove a y Dispatch call.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on JSONEncoder with dictionary of objects?
This is another interesting way to do it: https://stackoverflow.com/questions/48297263/how-to-use-any-in-codable-type
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Does Swift has a string builder class?
Sure, it does not equate. But each language has its own optimisations relative to Strings handling (and there are many). Are you sure that those other languages do not create an interim String when using appendFormat ? In anycase, form developer point of view, creating an intermediate String is not an issue (unless I missed something).
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Inconsistent behavior in invoking a Swift method from a different class?
Could you post a complete minimal project to replicate the issue ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on View won't update in ForEach loop
Thanks for the feedback. Don’t forget to close the thread by marking the correct answer.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Type 'User' does not conform to protocol 'Decodable'
@Scott it seems convertFromSnakeCase and underscores are incompatible. Removing any o the 2 solves the issue. As exposed in Apple documentation, with convertFromSnakeCase, fee_fi_fo_fum converts to: feeFiFoFum: underscores are removed and replace by following uppercase.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Get row index when user click a button in NSTableCellView
Thanks for feedback. It should work with very similar approach for AppKit.Just replace UITableViewCell by NSTableCellView and use row(for view: NSView)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on A question about Swift enum syntax
OK, you were referring to allCases, not the case declaration
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’23