import SwiftUI
struct ContentView: View {
var body: some View {
Group{
if let resBundlePath = Bundle.main.path(forResource: "Resources", ofType: "bundle"),
let resBundle = Bundle(path: resBundlePath),
let uiImage = UIImage(named: "imagename", in: resBundle, with: nil){
Image(uiImage: uiImage)
.resizable()
.scaledToFit()
}else{
Color.red
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}