Open sidan opened 9 years ago
Rafael,
I haven’t seen that before. Are you sure you don’t have more than 1 spreadsheet view being added to the popup?
This is just a group of UICollectionViews so I’d check to see if something is strange in the delegate calls.
Jeff
Well, I'm actually using just one spreadsheet inside this viewcontroller but with a slight custom implementation as attached in the code below.
Here is how I'm loading the data source:
...Here, how I'm initializing the spreadsheet:
In the beginning I was assigning the spreadsheet to the main view and the scroll was not working properly, because the spreadsheetview was being drawn out of bounds of main view. Then, I fix it by assigning the spreadsheetview to the child view as its content. At that point, the contents of cells started to be drawn out of order while scrolling.
Really appreciate any help on this!
Is initSpreadSheetView being called more then once? Try adding NSLog(@"%s", PRETTY_FUNCTION); at the top of the function and bring it up a few times (looks like it's a view inside of a popup). That method should only fire once. If it's getting called more than once, there is the problem.
Yes, it's being called just once from viewDidLoad and I could confirm it by logging "PRETTY_FUNCTION". What else it could be? :)
Did you try open and closing self.viewProdutoEmProdutos several times so see if the initializer is getting called more than once?
From what you've shown, I don't see a problem.
You might try just using a UICollectionView in place of the spreadSheetView to see if you get the same problem.
Hi all, I ran into the same problem when I was using it. It turns out it is a problem with the uicollection view cells not being properly reused.
What I did was every time I added a cell, I removed all its child views. That fixed it for me.
Here is the code I used: -(void)resetCell{ for (UIView *view in [self.contentView subviews]) { [view removeFromSuperview]; } }
@ITDebicki Are you saying this is a UICollectionView issue or something in @sidan 's cell implementation? Perhaps needing to check or destroy the cell's subviews in prepareForReuse
?
I didn't investigate it fully, but I just used this method in the init method of each cell
@ITDebicki , it seems a nice work around, which I've used so far to reload the view while using this library: https://www.cocoacontrols.com/controls/tstableview that I end up with cuz of project's deadline. Thanks for supporting..
Alright, to start, would like to say this library is a good job and help me a lot as a solution for presenting spreadsheets. Second, would like to know how to solve this issue:
I've made some customization for populate the content within the spreadsheet. But while scrolling, the cells are being drawn above each other, out of order, producing a great mess in the screen.
It goes like this:
But when I scroll H or V:
Would like to have (please) some clarification about it.
Thanks in advance