实战需求
SwiftUI 富文本组件之支持显示HTML各类标签RichText (教程含源码)
本文价值与收获
看完本文后,您将能够作出下面的界面
核心组件
- enum枚举
import Foundation
public enum colorScheme: String {
case light = "light"
case dark = "dark"
case automatic = "automatic"
}
public enum fontType : String {
case `default` = "default"
case monospaced = "monospaced"
case italic = "italic"
}
- webview组件
import WebKit
struct Webview : UIViewRepresentable {
@