最新发布第21页
排序
Day 17 – 自定义类(Class)
自定义类 类定义的语法,如下 # 类的定义, ClassName必须首字母大写 class ClassName: # 类的对象 class_name_1 = ClassName() 常见的几种命名方式- PascalCase - camelCase - snake_case 构造...
SwiftData 调试
SwiftData 在调试时可以直接在输出窗口显示对应的 SQL 语句。 设置方法 点击如下的按钮,弹出 Scheme 窗口 在弹出的Scheme 窗口中,选择 Run菜单,然后选择 Argument 标签页,点击+号按钮。 然...
How to manipulate an AsyncSequence using map(), filter(), and more 如何使用 map()、filter() 等作 AsyncSequence
AsyncSequence has implementations of many of the same methods that come with Sequence, but how they operate varies: some return a single value that fulfills you...
How to create and use task local values 如何创建和使用任务本地值
Swift lets us attach metadata to a task using task-local values, which are small pieces of information that any code inside a task can read.Swift 允许我们使用 task-local ...
How to set a time limit for concurrent tests 如何为并发测试设置时间限制
Both Swift Testing and XCTest have simple mechanisms for controlling how long tests should be allowed to run before being considered a failure. This is critically important for con...
Paging Library
基本介绍 Paging Library 是 Android Jetpack 中用于 高效加载大型数据集的一套组件。它能够让你的应用以 分页(Page) 的方式逐步加载数据,而不是一次性加载全部,尤其适用于: 数据量很大(...
Collection 集合
Kotlin 的 Collections(集合)分为不可变集合和可变集合。不可变集合是只读集合,元素在创建之后不能被修改,常见的不可变集合方法有: List 中的 listOf()、ListOf<T>() Set 中的 setOf(...
Bottom Navigation
创建 Screen HomeScreen 的可组合函数 @Composable fun HomeScreen() { Column( modifier = Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally ) { Button( onClick...
Retrofit
Retrofit 是 Square 出品的一个 类型安全的 HTTP 客户端,用于 Android / Java / Kotlin 中进行网络请求。 基于 OkHttp 支持 协程(suspend) 支持 Gson / Moshi 解析 基本使用 1. 添加依赖 dep...







