Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text is not displayed on the SVGView #25

Open
LiYanan2004 opened this issue Oct 16, 2022 · 1 comment
Open

Text is not displayed on the SVGView #25

LiYanan2004 opened this issue Oct 16, 2022 · 1 comment

Comments

@LiYanan2004
Copy link

My Code here:

import SwiftUI
import SVGView

struct ContentView: View {
    @State private var data: Data?
    
    var body: some View {
        if let data {
            SVGView(data: data)
        } else {
            Color.black.opacity(0.001)
                .task {
                    if let (data, _) = try? await URLSession.shared.data(from: URL(string: "https://img.shields.io/cocoapods/l/SVGView.svg?style=flat")!) {
                        self.data = data
                    }
                }
        }
    }
}

I use the one in your README.md file, and this is( I guess ) a SVG, but SVGView can only show the background but no text on it.

截屏2022-10-16 16 50 49

@LiYanan2004
Copy link
Author

Any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant