Introspect now properly updates on every view lifecycle change, so add a check to a reference on the UIHostingController and see if it has been instantiated already. Also clean up view struct names to reflect what is a modifier. Signed-off-by: kingbri <bdashore3@proton.me>
17 lines
322 B
Swift
17 lines
322 B
Swift
//
|
|
// ViewDidAppearModifier.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 2/8/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ViewDidAppearModifier: ViewModifier {
|
|
let callback: () -> Void
|
|
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.background(ViewDidAppearHandler(callback: callback))
|
|
}
|
|
}
|