最新发布第25页
Transaction-Stewed Noodles 资源

Transaction

当前状态处理更新的上下文。 transaction(value:_:) 使用.transaction 修饰符来更改或替换视图中使用的动画。考虑一个由按钮控制的三个相同视图,同时改变所有三个的情况: 第一个视图通过旋转...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX1年前
0230
Why can’t we call async functions using async var? 为什么我们不能使用 async var 调用 async 函数?-Stewed Noodles 资源

Why can’t we call async functions using async var? 为什么我们不能使用 async var 调用 async 函数?

Swift’s async let syntax provides short, helpful syntax for running lots of work concurrently, allowing us to wait for them all later on. However, it only works as ...
How to handle different result types in a task group 如何处理任务组中的不同结果类型-Stewed Noodles 资源

How to handle different result types in a task group 如何处理任务组中的不同结果类型

Each task in a Swift task group must return the same type of data as all the other tasks in the group, which is often problematic – what if you need one task group to handle ...
What’s the difference between async let, tasks, and task groups? async let、tasks 和 task groups 之间有什么区别?-Stewed Noodles 资源

What’s the difference between async let, tasks, and task groups? async let、tasks 和 task groups 之间有什么区别?

Swift’s async let, Task, and task groups all solve a similar problem: they allow us to create concurrency in our code so the system is able to run them efficiently. Beyo...
SubscriptionStoreView 订阅商店视图-Stewed Noodles 资源
Manifest 文件-Stewed Noodles 资源

Manifest 文件

Manifest.xml 文件是重要的配置文件,提供了Android 应用程序的基本信息。 <?xml version='1.0' encoding='utf-8'?> <!--配置清单的开始标记--> <manifest xmlns:android='http://sche...
Jetpack Compose-Stewed Noodles 资源

Jetpack Compose

Jetpack compose 是谷歌开发的一款现代工具包,用于构建原生 Android用户界面。它允许开发者使用声明式编程模型为 Android应用构建 UI 界面,当底层数据发生改变时,Compose 负责更新 UI 界面,...
Docker 部署 Ollama-Stewed Noodles 资源

Docker 部署 Ollama

安装 ollama这里采用 docker 进行 ollama 的部署。部署支持 CPU 也支持 GPU, 详情参考https://hub.docker.com/r/ollama/ollama。这里采用 CPU 的安装模式,安装命令如下docker run -d -v /opt/...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX2年前
0220
使用 @Model 宏定义模型-Stewed Noodles 资源

使用 @Model 宏定义模型

您将使用 @Model 宏来定义所有 SwiftData 模型类。该宏会自动使您的类能够从 SwiftData 加载和存储数据,支持观察更改,并添加 Hashable、Identifiable、Observable 和 PersistentModel 的遵循...
What’s the performance cost of calling an async function? 调用 async 函数的性能成本是多少?-Stewed Noodles 资源

What’s the performance cost of calling an async function? 调用 async 函数的性能成本是多少?

Whenever we use await to call an async function, we mark a potential suspension point in our code – we’re acknowledging that it’s entirely possible our function w...