Last active
January 8, 2023 21:52
-
-
Save Mercandj/9dcff6a798eda205066b044610e3daa8 to your computer and use it in GitHub Desktop.
This file contains 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
import UIKit | |
import SwiftUI // <-- Add SwiftUI import | |
class HelloWorldView: UIView { | |
// UIView code here | |
struct HelloWorldView_Preview: PreviewProvider { // <-- Add the preview definition | |
static var previews: some View { | |
Preview() | |
} | |
private struct Preview: UIViewRepresentable { | |
func makeUIView(context: Context) -> UIView { | |
HelloWorldView() | |
} | |
func updateUIView(_ uiView: UIViewType, context: Context) { | |
// Not needed | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment