SwiftUI에서 viewDidLoad는?
develop, iOS, swiftui
SwiftUI에서 viewDidLoad는?
struct ContentView: View {
var body: some View {
VStack {
Text("Hello World")
}.onAppear {
print("ContentView appeared!")
}.onDisappear {
print("ContentView disappeared!")
}
}
}