Skip to content

Commit 7503bb6

Browse files
Merge pull request #5178 from BarneyZhaoooo/barneyzhaoooo
fix #5176
2 parents 871d1a0 + 4b18788 commit 7503bb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Reports/2025/#355-2025.10.20.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ Live Activities 的核心是帮助用户快速获取关键动态信息,减少
7171

7272
[@david-clang](https://github.com/david-clang):作者利用 UITextField 在 isSecureTextEntry = true 时自带的“截图防泄露”机制,将需要隐藏的视图嵌入其安全子视图中,从而实现内容在截图与录屏时自动隐藏的效果,作者还用 UIViewRepresentable 封装出 .hideInScreenshot() 修饰符,让 SwiftUI 也能轻松实现防截图效果。
7373

74+
### 🐕 [Why a custom ViewModifier is often useless](https://www.swiftwithvincent.com/blog/why-a-custom-viewmodifier-is-often-useless)
75+
76+
[@Barney](https://github.com/BarneyZhaoooo):文章主要阐述何时需要创建自定义 `ViewModifier`。作者指出,若只需封装不涉及 `@State``@Environment` 的修饰符,直接使用 `View` 扩展方法即可,无需创建 `ViewModifier` 结构体。仅当需要管理状态或使用属性包装器时,才必须创建 `ViewModifier` 以正确处理这些需求。简而言之,`ViewModifier` 并非总是必需的,应根据实际需求选择合适的实现方式。
77+
7478
## 工具
7579

7680
> 开发过程中常用的工具,及一些新工具的介绍

0 commit comments

Comments
 (0)