iPages icon indicating copy to clipboard operation
iPages copied to clipboard

Error when try to use combined with ForEach

Open jgiunta opened this issue 3 years ago • 1 comments

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)
                            }
                        }
                    }

jgiunta avatar Apr 01 '21 23:04 jgiunta

Could you elaborate a little bit more on this issue? Where is line 78?

AlexFine avatar May 03 '21 16:05 AlexFine