SVGView icon indicating copy to clipboard operation
SVGView copied to clipboard

Text is not displayed on the SVGView

Open LiYanan2004 opened this issue 1 year ago • 1 comments

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 avatar Oct 16 '22 08:10 LiYanan2004