Skip to content

Commit 603e9db

Browse files
authored
Update #323-2025.02.17.md
1 parent 3c807c8 commit 603e9db

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Reports/2025/#323-2025.02.17.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ iOS App Intents 是苹果生态中实现「功能原子化」的核心工具,
4545

4646
[@DylanYang](https://github.com/Dylan19Yang):作者为我们介绍了 Swift 6 和 iOS 18 下的新同步框架,其中主要包含了两个底层结构 Mutex 和 Atomics。作者在本文中对这两个新的能力做了较为详细的说明和性能比对。Mutex 能使得对被他包裹的数据的访问自动上锁,在性能上和手动通过代码上锁区别不大,但是相比使用 Actor 有不少提升。不过相比 Actor 的缺点自然是锁会阻塞当前线程。而 Atomic 则可以使被他包裹的操作都为原子操作不会被并发打断。从性能上看它和 Actor 比并没有较大优势,因此大多数情况下使用 Actor 已经足够。对同步框架感兴趣的读者可以花时间阅读下本文。
4747

48+
### 🐎 [Understanding SwiftUI Preferences](https://peterfriese.dev/blog/2025/swiftui-preferences-swift6/#what-are-preferences-in-swiftui)
49+
50+
[@JonyFang](https://github.com/JonyFang): 本篇主要介绍了 SwiftUI 中的 Preferences 机制,讲述了其在父子视图间传递数据的作用。 作者通过具体示例,展示了如何利用 Preferences 构建自定义视图,如表单验证功能。 此外,文章还讨论了 Swift 6 中与 Preferences 相关的问题,提供了对开发者有价值的见解。 总的来说,这篇文章为开发者深入理解和应用 SwiftUI 的 Preferences 提供了清晰的指导。
51+
4852
## 工具
4953

5054
### 🐢 [SweetPad: Develop Swift/iOS projects using VSCode](https://github.com/sweetpad-dev/sweetpad)

0 commit comments

Comments
 (0)