Answers for "swiftui func return view"

0

func that returns a view swiftui

@ViewBuilder func getView(view: String) -> some View {
    switch view {
    case "CreateUser":
        Text(view)
    case "Abc":
        Image("Abc")
    default:
        EmptyView()
    }
}
Posted by: Guest on February-03-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language