12345678910111213141516171819202122232425 |
- //
- // ViewModel.swift
- // fiveConstant
- //
- // Created by 李建 on 2023/1/14.
- //
- import Foundation
- import Combine
- class ViewModel: ObservableObject {
- var webViewNavigationPublisher = PassthroughSubject<WebViewNavigation, Never>()
- var showWebTitle = PassthroughSubject<String, Never>()
- var showLoader = PassthroughSubject<Bool, Never>()
- var valuePublisher = PassthroughSubject<String, Never>()
- }
- // For identifiying WebView's forward and backward navigation
- enum WebViewNavigation {
- case backward, forward, reload
- }
- // For identifying what type of url should load into WebView
- enum WebUrlType {
- case localUrl, publicUrl
- }
|