Created
August 22, 2021 14:29
-
-
Save ANSCoder/6841bf331127cb63d66cad4c0d7cfbe6 to your computer and use it in GitHub Desktop.
Revisions
-
ANSCoder created this gist
Aug 22, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ // // LazyView.swift // Grocers // // Created by Anand Nimje on 10/09/20. // Copyright © 2020 Anscoder. All rights reserved. // import SwiftUI /// Create destination View inside the NavigationButton lazily. struct LazyView<Content: View>: View { let build: () -> Content init(_ build: @autoclosure @escaping () -> Content) { self.build = build } var body: Content { build() } }