-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MvxActionBasedBindableTableViewSource.GetOrCreateCell For in MonoTouch #57
Comments
Thanks for the report Is a fix for this as simple as the MvxActionBasedBindableTableViewSource also provinding a mechanism to override the CellIdentifier call too? In the slightly longer term I'd also want to look at moving CellIdentifier to be a virtual property in the base table source class. Will look at this more later Stuart |
Something like https://gist.github.com/4119401 - but won't test properly until much later tonight! |
Hi, thanks for the quick reply. I have just done a quick test, and now the cells are reused as expected. Thanks. But my second problem still exist: Without the patch, I could update the Datasource and the uitablecell directly updates the view via binding. Now I have to scroll the cell out of sight and back to refresh the content. Greetings Oliver |
I think you'll maybe need to look at the cell code to force it to redraw - try adding code like SetNeedsLayout and SetNeedsRedraw - see http://stackoverflow.com/questions/950769/how-to-refresh-uitableviewcell and lots of other qu's
|
Thanks for the report. ActionBased problem fixed in both master and vnext. If there's more on the SetNeedsRedraw issue, then please let me know... either here (reopen) or u=in a new issue. Closing for now. |
Feature/false warning
Update MvxCachingFragmentActivityCompat.cs
Hi,
it seems, that MVVMCross is not using the possibility of reusing cells in iOS UITableView, if I'm using the MvxActionBasedBindableTableViewSource.
In GetOrCreateCell method MVVMCross is trying to get a cached cell with tableView.DequeueReusableCell(CellIdentifier), but the CellIdentifier is not the one given in the constructor, but the const NSString("MvxDefaultBindableTableViewCell"). So it will never find a cell to reuse.
You can reproduce this with your Sponsors Table in the conference demo.
To check if it is working at all, I had set the ReusableIdentifier of my cell to "MvxDefaultBindableTableViewCell". So the reusing is working properbly, but now binding is not working as expected anymore. The cell will only be refreshed, once it is scrolled out of sight and back in.
Can you give me a hint, how to get both working ? Reusing of cells and the direct refresh ?
Greetings Oliver
The text was updated successfully, but these errors were encountered: