Hi I'm trying to do a To-Do app and I got this error from NSFetchRequest:
"Cannot find type 'ToDoItem' in scope"
//
// ToDOView.swift
// To-DO
//
// Created by Gal Aviel on 16/02/2021.
//
import SwiftUI
import CoreData
import Foundation
import Combine
import CoreFoundation
struct ToDOView: View {
@Environment(\.managedObjectContext) var manageObjectContext
@FetchRequest(fetchRequest: Todoitem.getAllToDoiTems()) var toDoitems:FetchedResultsToDoItem
var body: some View {
Text("Hello, World!")
}
}
struct ToDOView_Previews: PreviewProvider {
static var previews: some View {
ToDOView()
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Someone know how to fix that?
import UIKit
struct ContentView: View {
var Count = Int(0)
var body: some View { error: "Failed to produce diagnostic
for expression; please file a bug report"
VStack {
Image("IMG")
.padding(.trailing, 353.844)
.scaleEffect(0.3)
.fixedSize()
Spacer()
Text("Count:" + String(Count))
.font(.largeTitle)
.animation(.easeIn(duration: 0.5))
Spacer()
Button(Text(Count), action: {
Count += 1
})
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}