You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
Sorry in advanced, but I'm not sure why the first line of each struct break code markdown here?
Describe the bug
I have a TabView in my main ContentView body. I have four structs that return the content view of each tab item. Two of these structs contain an ASCollectionView; the first collection has three ASCollectionViewSections and the second collection has two. The project builds fine, Xcode reports no errors in the code and the syntax highlighting is showing everything the way it should look. The app installs on emulators and physical devices with no issue. But the canvas preview fails to build and claims it can't type check the expression in reasonable time. If I replace my first ASCollectionView; the one with three ASCollectionViewSections, with a simple Text view, the canvas builds works as expected. However, if I replace the last ASCollectionView; the one only containing two ASCollectionViewSections, with a simple Text view and uncomment the first ASCollectionView, canvas still fails to build. I have replaced the entire first ASCollectionView with a copy of the one that doesn't cause Canvas to fail and I have even replaced the entire content view struct with a copy of the struct that works, changing out the data collection and item names to be used in the collection with those of the one it is replacing. I have also tried only putting two sections in it to exactly mimic the collection that works. But no matter what this one collection makes canvas fail. Any help, guidance or info provided is greatly appreciated.
To Reproduce
Here are both of my ASCollection View structs, the item models used for the lists return an int for their position and a few strings for details about theirselves, other than one collection having 3 sections and one having 2, I don't see any differences that would result in one breaking canvas preview and one not.
`
struct OtherItemViewContent: View { @State private var otherItemOneList = ListItem @State private var otherItemTwoList = ListItem @State private var otherItemThreeList = ListItem
Sorry in advanced, but I'm not sure why the first line of each struct break code markdown here?
Describe the bug
I have a TabView in my main ContentView body. I have four structs that return the content view of each tab item. Two of these structs contain an ASCollectionView; the first collection has three ASCollectionViewSections and the second collection has two. The project builds fine, Xcode reports no errors in the code and the syntax highlighting is showing everything the way it should look. The app installs on emulators and physical devices with no issue. But the canvas preview fails to build and claims it can't type check the expression in reasonable time. If I replace my first ASCollectionView; the one with three ASCollectionViewSections, with a simple Text view, the canvas builds works as expected. However, if I replace the last ASCollectionView; the one only containing two ASCollectionViewSections, with a simple Text view and uncomment the first ASCollectionView, canvas still fails to build. I have replaced the entire first ASCollectionView with a copy of the one that doesn't cause Canvas to fail and I have even replaced the entire content view struct with a copy of the struct that works, changing out the data collection and item names to be used in the collection with those of the one it is replacing. I have also tried only putting two sections in it to exactly mimic the collection that works. But no matter what this one collection makes canvas fail.
Any help, guidance or info provided is greatly appreciated.
To Reproduce
Here are both of my ASCollection View structs, the item models used for the lists return an int for their position and a few strings for details about theirselves, other than one collection having 3 sections and one having 2, I don't see any differences that would result in one breaking canvas preview and one not.
`
struct OtherItemViewContent: View {
@State private var otherItemOneList = ListItem
@State private var otherItemTwoList = ListItem
@State private var otherItemThreeList = ListItem
}
struct ListItemsViewContent: View {
@State private var dataOneList = ListItem
@State private var dataTwoList = ListItem
}`
Expected behaviour
Both views should work with canvas preview
Screenshots
N/A
Xcode Version:
Simulator, Device, Both?
The text was updated successfully, but these errors were encountered: