← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 20
  1. After my previous post Tracking renamed files in Git, here’s another entry in my ongoing series “I thought git mv was useless but I was wrong”.

  2. Git famously doesn’t track file renames.

  3. The Swift website provides nightly builds of the Swift compiler (called toolchains) for download.

  4. You may have noticed that the Swift compiler automatically treats the closure of a DispatchQueue.main.async call as @MainActor.

  5. And what it can teach us about SwiftUI’s stack layout algorithm I have one more thing to say on the relative sizing view modifier from my previous post, Working with percentages in SwiftUI layout.

  6. SwiftUI’s layout primitives generally don’t provide relative sizing options, e.g.

  7. Problem The Photos app on macOS doesn’t provide a keyboard shortcut for the Export Unmodified Original command. macOS allows you to add your own app-specific keyboard shortcuts via System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts.

  8. I rarely participate actively in the Swift Evolution process, but I frequently refer to evolution proposals for my work, often multiple times per week.

  9. Foundation overloads the pattern matching operator ~= to enable matching against error codes in catch clauses. catch clauses in Swift support pattern matching, using the same patterns you’d use in a case clause inside a switch or in an if case … statement.

  10. I know I’m almost a decade late to this party, but I’m probably not the only one, so here goes.

  11. I wrote an app called SwiftUI View Lifecycle.

  12. The clipped() modifier in SwiftUI clips a view to its bounds, hiding any out-of-bounds content.

  13. On the positioning of the .animation modifier in the view tree, or: “Rendering” vs.

  14. Mac apps built with Xcode 14.0 and 14.0.1 may contain concurrency bugs because the Swift 5.7 compiler can generate invalid code when targeting the macOS 12.3 SDK.

  15. SwiftUI’s .task modifier inherits its actor context from the surrounding function.

  16. iOS 16 beta 4 is the first SDK release that supports Live Activities.

  17. How @MainActor works

    @MainActor is a Swift annotation to coerce a function to always run on the main thread and to enable the compiler to verify this.

  18. Here’s a simple AttributedString with some formatting: import Foundation let str = try!

  19. The environment in SwiftUI is sort of like a global dictionary but with stronger types: each key (represented by a key path) can have its own specific value type.

  20. We released the fifth edition of our book Advanced Swift a few days ago.