Can anyone give me assistance on how to fix this. My preview crashed because a Fatal Error in ModelData.
This is how my ModelData looks:
import SwiftUI
struct SutraokeDetail: View {
@Environment(ModelData.self) var modelData
var sutra: Sutras
var body: some View {
@Bindable var modelData = modelData
ScrollView {
CircleImage(image: sutra.image)
.offset(y: -130)
.padding(.bottom, -130)
VStack(alignment: .leading) {
HStack{
Text(sutra.name)
.font(.title)
Spacer()
Text(sutra.text)
}
}
}
}
}
#Preview {
let modelData = ModelData()
return SutraokeDetail(sutra: modelData.sutras[0])
.environment(modelData)
}
Post
Replies
Boosts
Views
Activity
I am new in iOS developing world and I created my first app, which is a planner and time management tools. I tried to publish and my app was rejected because: 4. 3 Design: Spam Guideline 4.3 - Design. I am confused. What should I do?