最新发布第25页
删除数据-Stewed Noodles 资源

删除数据

删除 SwiftData 对象需要两个步骤:首先在你的模型上下文上调用 delete()方法,并传入你想要删除的对象;然后保存更改,可以通过显式调用 save(),或者如果启用了自动保存,则等待自动保存触发...
Transaction-Stewed Noodles 资源

Transaction

当前状态处理更新的上下文。 transaction(value:_:) 使用.transaction 修饰符来更改或替换视图中使用的动画。考虑一个由按钮控制的三个相同视图,同时改变所有三个的情况: 第一个视图通过旋转...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX1年前
0230
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...
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...
匿名函数-Stewed Noodles 资源

匿名函数

匿名函数:没有名字的函数。 语法 基本语法 val anonymousFunction = fun(parameters): ReturnType {    body    return statement if needed} 示例代码 val numbers =...
Docker 部署 Gitlab-Stewed Noodles 资源