📜  返回视图 swiftui 的 func - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:03.234000             🧑  作者: Mango

代码示例1
@ViewBuilder func getView(view: String) -> some View {
    switch view {
    case "CreateUser":
        Text(view)
    case "Abc":
        Image("Abc")
    default:
        EmptyView()
    }
}