<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>macOS 14 - 标签 - 宋明的博客</title><link>https://apolla.cc/tags/macos-14/</link><description>宋明的博客</description><generator>Hugo 0.170.0 &amp; FixIt v1.0.0-rc.5-mwimukpl</generator><language>zh-cn</language><lastBuildDate>Wed, 11 Oct 2023 08:00:00 +0800</lastBuildDate><atom:link href="https://apolla.cc/tags/macos-14/index.xml" rel="self" type="application/rss+xml"/><item><title>1.5 SwiftUI 中的属性包装器</title><link>https://apolla.cc/posts/1.5-swiftui-%E4%B8%AD%E7%9A%84%E5%B1%9E%E6%80%A7%E5%8C%85%E8%A3%85%E5%99%A8/</link><pubDate>Wed, 11 Oct 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/1.5-swiftui-%E4%B8%AD%E7%9A%84%E5%B1%9E%E6%80%A7%E5%8C%85%E8%A3%85%E5%99%A8/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;以下内容适用于 iOS 16/macOS 13 以上的系统，iOS 17/macOS 14 新增的 &lt;a href="https://developer.apple.com/documentation/observation" target="_blank" rel="external nofollow noopener noreferrer"&gt;Observation&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt; 框架简化了 SwiftUI 的状态管理，苹果的文档有非常详细的使用说明和迁移教程，笔者也写了一篇关于 Observation 的文章以供参考：&lt;a href="https://www.woter.xyz/blog/ios/swiftui/swiftui-observation-combine" target="_blank" rel="external nofollow noopener noreferrer"&gt;《有了 Observation，SwiftUI 还需要 Combine 吗》&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;。&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>1.3.3 模态（Modal）</title><link>https://apolla.cc/posts/1.3.3-%E6%A8%A1%E6%80%81modal/</link><pubDate>Tue, 10 Oct 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/1.3.3-%E6%A8%A1%E6%80%81modal/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;p&gt;模态是除导航之外的另一种重要的信息呈现方式，它通常以一种临时的界面和用户交互。如果把导航栈内的界面比作“主线”的话，模态就是分出来的“支线”。模态视图完成它的使命后，用户最终会回归至“主线”情景。&lt;/p&gt;&#10;&lt;p&gt;关于模态的更多设计语言以及使用场景，可以参考 &lt;a href="https://developer.apple.com/design/human-interface-guidelines/patterns/modality" target="_blank" rel="external nofollow noopener noreferrer"&gt;《人机界面指南》&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;。&lt;/p&gt;</description></item><item><title>4.3 图表（Charts）</title><link>https://apolla.cc/posts/4.3-%E5%9B%BE%E8%A1%A8charts/</link><pubDate>Tue, 10 Oct 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/4.3-%E5%9B%BE%E8%A1%A8charts/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;h1 class="heading-element" id="基础"&gt;&lt;span&gt;基础&lt;/span&gt;&#10; &lt;a href="#%e5%9f%ba%e7%a1%80" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;&lt;a href="https://developer.apple.com/documentation/charts" target="_blank" rel="external nofollow noopener noreferrer"&gt;Charts&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt; 是 iOS 16/macOS 13 的新特性，用于构建各种精美的图表，如柱状图、散点图、曲线图等。&lt;/p&gt;</description></item><item><title>1.4 SwiftUI 视图管理机制</title><link>https://apolla.cc/posts/1.4-swiftui-%E8%A7%86%E5%9B%BE%E7%AE%A1%E7%90%86%E6%9C%BA%E5%88%B6/</link><pubDate>Wed, 02 Aug 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/1.4-swiftui-%E8%A7%86%E5%9B%BE%E7%AE%A1%E7%90%86%E6%9C%BA%E5%88%B6/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;h1 class="heading-element" id="视图的身份标识identity"&gt;&lt;span&gt;视图的身份标识（Identity）&lt;/span&gt;&#10; &lt;a href="#%e8%a7%86%e5%9b%be%e7%9a%84%e8%ba%ab%e4%bb%bd%e6%a0%87%e8%af%86identity" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;在 UIKit/AppKit 的世界，UIView/NSView 实例是引用类型（class），程序通过指针来引用和区分对象。要实现界面的更新，我们首先需要找到对应的视图，然后下达相应的指令，比如改变视图的位置或者颜色，然后界面才会随之更新，这是典型的命令式编程。&lt;/p&gt;</description></item><item><title>3.5 滑动视图（ScrollView）</title><link>https://apolla.cc/posts/3.5-%E6%BB%91%E5%8A%A8%E8%A7%86%E5%9B%BEscrollview/</link><pubDate>Tue, 25 Jul 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/3.5-%E6%BB%91%E5%8A%A8%E8%A7%86%E5%9B%BEscrollview/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;h1 class="heading-element" id="基础"&gt;&lt;span&gt;基础&lt;/span&gt;&#10; &lt;a href="#%e5%9f%ba%e7%a1%80" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;ScrollView 初始化方法如下：&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;init(&#10; _ axes: Axis.Set = .vertical,&#10; showsIndicators: Bool = true,&#10; content: () -&amp;gt; Content&#10;)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;axes&lt;/code&gt; 用于指定滑动的方向，默认是垂直方向。&lt;/p&gt;</description></item><item><title>2.2 图片</title><link>https://apolla.cc/posts/2.2-%E5%9B%BE%E7%89%87/</link><pubDate>Mon, 24 Jul 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/2.2-%E5%9B%BE%E7%89%87/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;h1 class="heading-element" id="image"&gt;&lt;span&gt;Image&lt;/span&gt;&#10; &lt;a href="#image" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;&lt;a href="https://developer.apple.com/documentation/swiftui/image" target="_blank" rel="external nofollow noopener noreferrer"&gt;Image&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt; 用于展示图片，它可以加载资源包（Bundle）中的图片和系统内置的图标。&lt;/p&gt;</description></item><item><title>4.4 基础动画</title><link>https://apolla.cc/posts/4.4-%E5%9F%BA%E7%A1%80%E5%8A%A8%E7%94%BB/</link><pubDate>Mon, 24 Jul 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/4.4-%E5%9F%BA%E7%A1%80%E5%8A%A8%E7%94%BB/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;p&gt;视图是数据状态的反映，状态的更新会驱动视图的更新。如果没有动画过渡，视图的变化会显得突兀。SwiftUI 提供了几种基于状态的动画，这些都是非常常用和基础的添加动画的方式。&lt;/p&gt;&#10;&lt;h1 class="heading-element" id="animation-方法"&gt;&lt;span&gt;.animation 方法&lt;/span&gt;&#10; &lt;a href="#animation-%e6%96%b9%e6%b3%95" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;修饰器方法 &lt;a href="https://developer.apple.com/documentation/swiftui/view/animation(_:value:)" target="_blank" rel="external nofollow noopener noreferrer"&gt;animation(_:value:)&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt; 可以方便的创建动画，它的声明如下：&lt;/p&gt;</description></item><item><title>4.5 转场动画</title><link>https://apolla.cc/posts/4.5-%E8%BD%AC%E5%9C%BA%E5%8A%A8%E7%94%BB/</link><pubDate>Mon, 24 Jul 2023 08:00:00 +0800</pubDate><guid>https://apolla.cc/posts/4.5-%E8%BD%AC%E5%9C%BA%E5%8A%A8%E7%94%BB/</guid><category domain="https://apolla.cc/categories/swiftui/">SwiftUI</category><description>&lt;br&gt;&#10;&lt;h1 class="heading-element" id="内置转场动画"&gt;&lt;span&gt;内置转场动画&lt;/span&gt;&#10; &lt;a href="#%e5%86%85%e7%bd%ae%e8%bd%ac%e5%9c%ba%e5%8a%a8%e7%94%bb" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h1&gt;&lt;p&gt;转场动画用于视图的添加、移除，使用如下方法为视图添加转场：&lt;/p&gt;</description></item></channel></rss>