Understanding actor initialization 了解 actor 初始化
Swift's actors run on their own executor most of the time, so they manage how and where their work is done. However, during the actor's initialization its executor isn't ready to t...
How to serialize parameterized tests with Swift Testing 如何使用 Swift Testing 序列化参数化测试
Swift Testing's parameterized tests allow us to send multiple values into a single test, and they'll be run in parallel for maximum performance. If you don't want this – if you wa...
State
当 State 改变时,Compose 会自动重新构建(recompose)相关 UI,这就是 Compose 声明式 UI 的核心。 mutableStateOf mutableStateOf 是 Jetpack Compose 中最基础的状态容器。它会: 存储任意...
Layout
Jetpack Compose 提供了多种选项,用于在容器内对齐和排列 UI 元素,比如 Column、Row、Box。 常用的布局类型 Arrangement Arrangement 用于控制子项在主轴方向上的间距,因此在 Column 中会看...
macOS Python 多版本管理
安装 Homebrew Homebrew 的官网 https://brew.sh/ 在终端输入以下命令进行安装 /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)' 安装完成后...
Day 9 – 字典与嵌套
字典 基本语法 字典是由键值对组成,基本的语法如下 {key1:value1, key2: value2, ...} 示例 # 字典示例 colors = { 'apple': 'red', 'pear': 'green', 'banana': 'yellow' } 基本使用 字典的基...
Day 16 – 面向对象编程(OOP)
面向对象编程(Object Oriented Programming, OOP),模拟事物为对象(Object),每个对象都有自己的属性(attribute)以及方法(methods)。 对象与类 在 OOP 中,有类(Class)以及对象(Obje...
phaseAnimator
一个容器,通过自动循环遍历你提供的一系列阶段来对其内容进行动画处理,每个阶段定义了动画中的一个离散步骤。 具有阶段动画的弹跳 例如,前面展示的表情符号弹跳动画具有两个阶段:向上移动和...
How to follow this guide 如何遵循本指南
This guide is called Swift Concurrency by Example because it focuses on providing as many examples as possible. My goal is to stay laser-focused on real-world problems and real-wor...







