RecyclerView
RecyclerView 是 Android 中一个用于高效展示大量列表数据的强大控件,是 ListView 的升级版。它具有更好的性能、更灵活的布局管理方式,并且支持强大的扩展能力。 RecyclerView 会回收这些独立...
How to test AsyncSequence and AsyncStream 如何测试 AsyncSequence 和 AsyncStream
Concurrent Swift code often streams values over time rather than returning them all at once, so it's important to be able to write tests to check an AsyncStream, AsyncSeq...
ViewPager
基本介绍 ViewPager 是一种布局管理器,允许用户在数据页面之间左右滑动切换。这通常用于构建包含 多个视图 或 功能区域 的应用,用户可以通过水平滑动在它们之间进行导航,类似于画廊或一系列...
How to control the priority of a task 如何控制任务的优先级
Swift tasks can have a priority attached to them, such as .high or .background, but the priority can also be nil if no specific priority was assigned. This...
@Transient 宏忽略属性持久化
如果你的模型类有一个或多个存储属性,希望在写入持久化存储时忽略一些属性,可以使用 @Transient 宏进行标注,这样 SwiftData 就不会将它们的值写入磁盘。 默认情况下,SwiftData 会将所有计算...
How to test completion handlers with Swift Testing and XCTest 如何使用 Swift Testing 和 XCTest 测试补全处理程序
When you're dealing with older concurrency code that relies on callback functions that get run when some work completes rather than using Swift concurrency's async/await ...






