示例工程 34-drawing-shapes-canvas

34-drawing-shapes-canvas/Diagnostics/ConstructGraphicsContext.swift

swift · 0.2 KB

// 故意编译失败:GraphicsContext 没有公开初始化器,只能由 Canvas 提供。
// 复现:swiftc -typecheck Diagnostics/ConstructGraphicsContext.swift
import SwiftUI
 
let context = GraphicsContext()