中文位于文章的下半部分
Weekly Comment
After more than a month of hard work, I am pleased to announce that the new version of Fatbobman's Blog has been launched as scheduled before the end of 2023. I am looking forward to your visits and welcome everyone to provide valuable opinions and suggestions. This update not only achieved my preset goals but also gave me a deeper understanding of the latest front-end development technologies. I will write an article to record the insights and experiences during this update process.
Starting from 2024, the English version of the articles will be published simultaneously on my blog (updates on Medium will stop on April 1st). This not only allows me to update technical content in a timely manner to keep up with the rapid changes in the tech field but also enables me to make full use of new features on the blog to create richer and more in-depth content.
Recently, Spline has launched its native app for the Apple ecosystem, which will soon support Apple Vision Pro in addition to iOS, iPadOS, and macOS. This not only provides developers with a smoother 3D creation environment but also allows them to efficiently integrate Spline-created content into their own applications, especially in popular frameworks like SwiftUI, to achieve interaction with 3D content. With the upcoming release of Apple Vision Pro, it is expected that more 3D tools and APIs will appear in the Apple ecosystem, providing developers with more choices.
Finally, I wish you all a happy new year and good health. In the new year, I hope that we can continue to make progress in our lives and work.
Previous Issue|Newsletter Archive
If you find this weekly newsletter or my blog helpful, I would greatly appreciate your consideration of making a donation through Patreon, or Buy Me a Coffee.
Originals
Exploring Key Property Wrappers in SwiftUI: @State, @Binding, @StateObject, @ObservedObject, @EnvironmentObject, and @Environment
In this article, we will explore several property wrappers that are commonly used and crucial in SwiftUI development. The purpose of this article is to help developers who are already familiar with general programming but relatively new to SwiftUI quickly understand the core functions and use cases of these property wrappers. Therefore, only an overview of the main features and usage considerations of these property wrappers is provided, rather than a comprehensive usage guide.
Recent Selections
Build Your First App with SwiftUI and SwiftData
Paul Hudson brings us a Christmas gift. In this article, Paul provides a free course that covers various aspects of building a complete iOS application using SwiftUI and SwiftData. It includes videos, texts, and source code, as well as detailed explanations on how to use PhotosUI, establish relationships in data models, handle external storage, sort and filter data, and perform UI previews. This article is intended for developers with a certain level of knowledge in Swift and SwiftUI. It aims to demonstrate the entire application development process through practical examples, allowing readers to gain in-depth understanding and practice these technologies.
How to Play Spatial Video On iOS 17.2
Although iOS 17.2 has brought a new feature of shooting spatial videos for the iPhone 15 Pro series devices, how can developers actually experience this technology without Apple Vision Pro being available on the market? In this article, Onee and Zion provide practical solutions to this problem. They detail how to shoot and create spatial videos that meet Apple standards under current conditions, as well as how to watch these videos without relying on Apple Vision Pro.
SwiftData Deleting Data
Compared to Core Data, SwiftData provides more deletion methods to assist developers in deleting data efficiently and safely. In this article, Keith Harrison introduces three main methods for deleting data in SwiftData, providing detailed explanations and some observations for each method to help developers understand the underlying logic behind deletion operations.
Integrating Haptic Feedback In SwiftUI Projects
Haptic feedback has always been a core component of the Apple device experience, and the application of feedback at the right moments can significantly enhance the user's interactive experience. In this article, Gabriel Theodoropoulos discusses the API related to haptic feedback in SwiftUI and provides practical advice on how to effectively utilize these APIs to optimize application functionality.
Quick Search with SwiftUI Searchable
FocusState is a powerful feature provided by SwiftUI that allows developers to manage text input components uniformly in their views. However, unfortunately, this management approach is not supported by the search bar created through the searchable modifier. In this article, Daniel Saidi proposes a solution: by using the onKeyPress modifier, he successfully includes the search bar in the unified management category in iOS 17 and macOS 14.
肘子的话
经过一个多月的辛勤工作,我很高兴地宣布新版的 肘子的 Swift 记事本 已于 2023 年底前如期上线。非常期待诸位的访问,并欢迎大家提供宝贵的意见和建议。这次更新不仅达到了我预设的目标,还让我对最新的前端开发技术有了更深入的认识。之后会写一篇文章,记录这次更新过程中的心得和体验。
从 2024 年开始,我将不再在其他平台同步发布我的文章(周报除外),所有新内容将只发布在我自己的博客上。这样做不仅方便我及时更新文章中的技术内容,以应对技术领域的快速变化,还能让我充分利用博客的一些新功能,创作出更加丰富和深入的内容。
近日,Spline 为苹果生态系统推出了它的原生应用,除了支持 iOS、iPadOS 和 macOS 外,很快还将支持 Apple Vision Pro。这不仅为开发者提供了一个更加流畅的 3D 创作环境,还使他们能够更高效地将 Spline 创作的内容融入自己的应用中,尤其是在如 SwiftUI 这样的流行框架中实现与 3D 内容的交互。随着 Apple Vision Pro 上市日期的临近,预计苹果生态系统中将出现更多的 3D 工具和 API,为开发者提供更多的选择。
最后,祝愿大家新年快乐,身体健康。在新的一年里,希望我们都能在生活和工作中继续有所收获。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
探讨 SwiftUI 中的关键属性包装器:@State、@Binding、@StateObject、@ObservedObject、@EnvironmentObject 和 @Environment
在这篇文章中,我们将探讨几个在 SwiftUI 开发中经常使用且至关重要的属性包装器。本文旨在帮助已经熟悉通用编程但对 SwiftUI 相对陌生的开发者,快速理解这些属性包装器的核心作用和适用场景,因此只提供了对这些属性包装器的主要功能和使用注意事项的概述,而非详尽的使用指南。
近期推荐
Build Your First App with SwiftUI and SwiftData
Paul Hudson 为大家带来的圣诞礼物。在这篇文章中,Paul 提供了一份免费的课程,涵盖了使用 SwiftUI 和 SwiftData 构建一个完整 iOS 应用程序的各个方面。它不仅包括了视频、文本和源代码,而且还详细介绍了如何使用 PhotosUI、实现数据模型的关系建立、外部存储的处理、数据排序和过滤,以及如何进行 UI 预览等功能。这篇文章是为有一定 Swift 和 SwiftUI 知识基础的开发者准备的,旨在通过实际操作展示整个应用开发过程,使读者能够深入了解和练习这些技术。
iOS 17.2 上新上的空间视频,要这样玩
虽然 iOS 17.2 已经为 iPhone 15 Pro 系列设备带来了拍摄空间视频的新功能,但在 Apple Vision Pro 还未上市的情况下,开发者该如何实际体验这项技术呢?在这篇文章中,Onee 和 Zion 为这一问题提供了切实可行的解决方案。他们详细介绍了如何在当前条件下拍摄、制作符合 Apple 标准的空间视频,以及在不依赖 Apple Vision Pro 的情况下如何观看这些空间视频。
SwiftData Deleting Data
相较于 Core Data ,SwiftData 提供了更多的删除方法以协助开发者更加高效、安全的删除数据。Keith Harrison 通过本文向读者介绍了当前 SwiftData 中删除数据的三种主要方法,并为每种方法提供了详细的说明和一些观察结果,帮助开发者理解删除操作的背后逻辑。
Integrating Haptic Feedback In SwiftUI Projects
触觉反馈( Haptic Feedback )一直是苹果设备体验的核心组成部分,恰当时机下对反馈的应用能显著提升用户的互动体验。在本篇文章中,Gabriel Theodoropoulos 探讨了 SwiftUI 中与触觉反馈有关的 API,并提供了关于如何有效利用这些 API 以优化应用功能的实用建议。
Quick Search with SwiftUI Searchable
FocusState 是 SwiftUI 提供的一项强大功能,使开发者能够在视图中统一管理文本输入组件。然而,遗憾的是,通过 searchable 修饰器创建的搜索栏并不支持这种管理方式。在这篇文章中,Daniel Saidi 提出了一个解决方案:借助 onKeyPress 修饰器,他成功地实现了在 iOS 17 和 macOS 14 中,将搜索栏纳入统一管理的范畴。
完整实作应用程式内购:替你的 App 加上订阅服务!
RevenueCat 是一个支持跨多平台的移动应用订阅套件,它为开发者提供了一个统一的接口来管理各平台的应用程序支付。近期该工具包推出了 Paywall 功能,使得开发者能够用极少的代码就能打造出吸引人的订阅界面。在这个视频里,Jane(ChaoCode)详细演示了如何在一个项目中完整地集成 RevenueCat 服务,从而为开发者提供了一套关于应用内购买和订阅服务的实际操作指南。