I'm Trying add SwiftUI to Old Project.
But Error in Group.
How do I solve this problem?
My Project:
- Xcode: 12.5.1
- iOS Deployment Target: 13.0
Swift Compiler Error
-
Static method 'buildBlock' requires that 'Group' conform to 'View'
-
Trailing closure passed to parameter of type 'NSManagedObjectContext' that does not accept a closure
As far as I read the messages, it looks like you have another type named Group
(which is an NSManagedObject
-- Core Data entity) in your project.
Please try something like this:
struct LostFindView: View {
var body: some View {
VStack {
SwiftUI.Group { //<-
Text("1")
Text("2")
Text("3")
Text("4")
Text("5")
Text("6")
Text("7")
Text("8")
Text("9")
Text("10")
}
Text("11")
}
}
}
Please use Code Block when you show some code, better read the hint from @robnotyou.