我正在尝试复制 WWDC 2019 会议“实践中的结合” https://developer.apple.com/videos/play/wwdc2019/721/ 中从 22:50 开始使用的“Wizard School Signup”示例SwiftUI(与会话期间使用的 UIKit 相对)。
我已经创建了示例中的所有发布者:validatedEMail、validatedPassword 和validatedCredentials。虽然validatedEMail 和validatedPassword 工作得很好,但使用CombineLatest 消耗两个发布者的validatedCredentials 永远不会触发
//
// RegistrationView.swift
//
// Created by Lars Sonchocky-Helldorf on 04.07.19.
// Copyright © 2019 Lars Sonchocky-Helldorf. All rights reserved.
//
import SwiftUI
import Combine
struct RegistrationView : View {
@ObjectBinding var registrationModel = RegistrationModel()
@State private var showAlert = false
@State private var alertTitle: String = ""
@State private var alertMessage: String = ""
@State private var registrationButtonDisabled = true …Run Code Online (Sandbox Code Playgroud)