View+Ext.swift
it will erase the view type to AnyView.
import Foundation
import SwiftUI
extension View {
func eraseToAnyView() -> AnyView {
return AnyView(self)
}
}
View+Ext.swift
it will erase the view type to AnyView.
import Foundation
import SwiftUI
extension View {
func eraseToAnyView() -> AnyView {
return AnyView(self)
}
}