From 73b638e6bb4744de267353669c938d6f704a1148 Mon Sep 17 00:00:00 2001 From: Alexandr Romanov Date: Sat, 19 Nov 2022 14:03:25 +0300 Subject: [PATCH] Add first appear --- Sources/OversizeCore/ViewModifier/OnFirstAppear.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/OversizeCore/ViewModifier/OnFirstAppear.swift b/Sources/OversizeCore/ViewModifier/OnFirstAppear.swift index 7de7f47..c1604d5 100644 --- a/Sources/OversizeCore/ViewModifier/OnFirstAppear.swift +++ b/Sources/OversizeCore/ViewModifier/OnFirstAppear.swift @@ -7,9 +7,9 @@ import SwiftUI private struct FirstAppear: ViewModifier { let action: () -> Void - + @State private var hasAppeared = false - + func body(content: Content) -> some View { content.onAppear { guard !hasAppeared else { return }