在 SwiftUI 的上下文中,单一事实来源 (SSOT) 是什么意思?

编程入门 行业动态 更新时间:2024-10-28 20:19:16
本文介绍了在 SwiftUI 的上下文中,单一事实来源 (SSOT) 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 Xcode 11 的 What's New 部分发现了这个术语.在 SwiftUI 的上下文中,这个术语到底是什么意思?

I found this term in the What's New section of Xcode 11. Exactly what is the meaning of this here in the context of SwiftUI?

SwiftUI 包括:设计工具读取和编写您为单一事实来源手动编辑的相同代码

SwiftUI includes: Design tools read and write the same code you edit by hand for a single source of truth

推荐答案

使用 SwiftUI,您可以以编程方式编写代码或使用设计工具来编辑 UI,这也会导致 SwiftUI 代码被修改.本质上,您只有源代码,没有单独的设计文件(即 nib 或 Storyboard),这意味着您的 UI 设计和处理 UI 的代码不可能永远不同步(这是以前的情况nib 文件或故事板).

With SwiftUI, you can either write the code programatically or use the design tool to edit the UI, which will also result in the SwiftUI code being modified. Essentially, you only have the source code, there's no separate design file (i.e. nib or Storyboard), which means that there is no way your UI design and the code handling the UI can ever get out of sync (which was the case previously with nib files or storyboards).

更多推荐

在 SwiftUI 的上下文中,单一事实来源 (SSOT) 是什么意思?

本文发布于:2023-10-08 14:17:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1472875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文中   事实   来源   SwiftUI   SSOT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!