Open pfbwitz opened 8 years ago
Having the same issue.
Fixed it for me!
I changed the constructor of my listview as such:
public InfiniteListView()
//: base(ListViewCachingStrategy.RecycleElement)
{
Inheriting the default constructor of the ListView fixed the issue for me :)
@pfbwitz wait, you removed the RecycleElement strategy from your ListView?
Yep. I did exactly that. I reckon the fast cell renderer manages it's own recycling and perhaps in conflicted with the Xamarin Forms cachingstrategy.
I've started reviewing @georgejecook's code. I'm still unconvinced this is the way to go. I hope @georgejecook will drop by and explain it for us as he is done on many occasions via forum and posts :)
Accidentally closed issue: https://github.com/twintechs/TwinTechsFormsLib/issues/31
Sorry!
Original issue:
"Hello,
I'm implementing this library on both Android and iOS (same solution/project). It works fine (super smooth!) in my Android project, but on iOS, my list doesn't load (fast)images and whenever I scroll, the app will crash with this message:
System.InvalidOperationException: Implement IBoxedCell on cell renderer: TwinTechs.Controls.NativeCell, TwinTechsLib.iOS, Version=1.0.5858.22559, Culture=neutral, PublicKeyToken=null
Google isn't helping me at all (it's as if IBoxedCell doesn't exist at all). It's working in the sample project, but it will crash everytime I try to run it on iOS."
Your reply:
"Can you give me the code for your cell and list please?"
My reply:
"Hello,
Thank you for your reply. I have two implementations of your fastcell. I'm using it for the complex fastcell I built, however it's easier to explain with the simplecell, since it's the same problem. Here's the xaml
The accompanying C#:
The Viewmodel:
The listview is simple custom control I made to enable infinite scrolling. It's simple and tiny, but does the job as well as examples I found elsewhere with a lot more code and complexity:
The listview isn't directly place on a page, but rather in a contentview, embedded on a page:
The contentview which holds the list is a xaml-file. The list is embedded like this:
The list is bound to data with an Init()-method:
The LoadData()- and AddProducts()-methods simply add data to the ObservableCollection.
I hope this is enough information. Now I'm forced to utilize the regular Viewcells on iOS, making the Android-version of the app perform much better. (iOS takes 3-5 seconds to load a new dataset from the observablecollection)"