Created
January 19, 2021 08:19
-
-
Save AlexandrFadeev/ade0f10fc89e4e65b5ae5e8bcbb5464c to your computer and use it in GitHub Desktop.
SwiftUI live preview for UIKit apps
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 characters
#if DEBUG | |
import SwiftUI | |
struct <#ViewController#>Presentable: UIViewControllerRepresentable { | |
func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { | |
} | |
@available(iOS 13.0, *) | |
func makeUIViewController(context: Context) -> UIViewController { | |
<#ViewController#>() | |
} | |
} | |
@available(iOS 13.0, *) | |
struct <#ViewController#>Preview: PreviewProvider { | |
static var previews: some View { | |
<#ViewController#>Presentable() | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment