iPages
iPages copied to clipboard
Error when try to use combined with ForEach
Hello, I'm trying to fill iPages using ForEach but I get this error. "Thread 1: Fatal error: Index out of range", on line 78 of PageViewController.swift of the iPages project.
This is the correct code to use or not support dynamic views ?
Thanks
iPages {
ForEach(notifications, id: \.self) { notification in
VStack {
Text(notification.subject)
.font(.title2)
.fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_MENU_TOKEN@*/)
Text(notification.kind)
.font(.title2)
Text(notification.updatedAt)
.font(.title3)
}
}
}
Could you elaborate a little bit more on this issue? Where is line 78?