c++ combine使用
This article guides you through building a complete app using only and exclusively those frameworks. Not only that, but we will also use a design pattern that has been gaining more and more traction in the Apple devs community. This is the MVVM architecture.
本文将指导您通过仅使用那些框架来构建完整的应用程序。 不仅如此,我们还将使用一种在Apple开发人员社区中越来越受欢迎的设计模式。 这是MVVM体系结构。
Before starting, note that this is the third and last part of the tutorial. For a better understanding of the exercise, please check out the previous parts:
在开始之前,请注意这是本教程的第三部分也是最后一部分。 为了更好地理解该练习,请查看以前的部分:
If it’s the first time that you are going to work with this frameworks, then I’d recommend you start for the basics:
如果这是您第一次使用此框架,那么我建议您从基础开始:
Basics of Combine framework and Combine tutorial.
我们将建立什么 (What we will build)
In previous parts, we saw how to develop the application model apart from the generic ViewModel which is based in the Airbnb’s MvRx. We also build the first app view, the book list.
在之前的部分中,我们了解了如何开发应用程序模型,以及基于Airbnb的MvRx的通用ViewModel 。 我们还建立了第一个应用程序视图,即图书清单。
In this last part tutorial we will learn how to implement the remaining and more complex views of this app. This includes: book detail and checkout.
在最后一部分的教程中,我们将学习如何实现该应用程序的其余视图和更复杂的视图。 这包括:书籍详细信息和结帐。
特定于视图的实现 (View-specific implementation)
If we take a look at the code, we will see that several components are involved in the the implementation o