Answers for "swiftui function with view return value"

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