Clarity Datagrid: Is there a recommended way to disable animations when expanding a row? - clarity

I'm trying to use Clarity datagrid with expandable rows:
https://vmware.github.io/clarity/documentation/datagrid/expandable-rows
While the animation when expanding a row manually is nice, I have a use case in which I need to render the grid with all rows expanded or with just some of them expanded. In this case the animation is annoying and causes unnecessary flickering. Is there a recommended way to disable it?

Pre-expanded rows with
<clr-dg-row-detail *clrIfExpanded="true">
or
<clr-dg-row-detail *clrIfExpanded="item.expanded">
do not animate: https://plnkr.co/edit/iwrxr80RphYLn96vb2qk?p=preview
You should update your question with an example, because based on my plunker you don't need to disable animations in your case.

Related

Is there any way I can use a SliverGrid outside a ScrollView?

I was trying to use a GridView without a scrolling behavior, and I achieved it by setting the "primary" attribute to false. By doing so I noticed that when one scrollable widget are nested to another, the card shadow gets this weird effect.
Note the difference between the shadow of the two cards
So I tried to get it working by using a SliverGrid, but I found out that I need to wrap it in a CustomScrollView or related, and by doing so I would create the shadow effect again. Is there any way I can use SliverGrid that allows me not to have a scrolling behavior?
There's a much easier solution.
Use Wrap instead of GridView
Wrap is similar to Column and Row. But it's two dimensional.
It also has the cool ability to control spacing between items.

How to make UITableView re-evaluate the need of a footer for a specific section?

I have a dynamic UITableView where I programmatically add rows and then I call insertRowsAtIndexPaths:withRowAnimation:.
The problem is, before the rows are added, I have a section footer. This section footer is no longer needed after the rows are inserted.
Is there any method that will force the UITableView to ask it's source again whether or not it needs that footer? Or maybe a way for me to manually remove it?
As a workaround I called reloadSections:withRowAnimation: but obviously that is not optimal since it's rendering my first call useless (I could call only reloadSections but it might be too much processing when I'm only adding rows - not to mention animation issues).
In a perfect world, I'd have a way to make the UITableView call for tableView(_:viewForFooterInSection:) again.
Ps [1]: Just reinforcing that i'm dealing with footerInSection, not tableViewFooter.
Ps [2]: Sorry for the horrible title.

UITableViewCell resort without whole table reload

I now have some table with some custom cells in it. It' can be scrolled, cells provide some information and can interact with user with some buttons and so on.
Is where any way to resort the cells with some animation without whole table reload?
for example I have cells with tags 1, 2, 3, 4, 5 - placed as I wrote here. I want to resort it to become 2,5,1,3,4 for example - and user must see the cells moving to it's new place - but without table reload. Now I have to reload the table - so there is no any visual animation and to user it can be hard to understand what there is go on...
Maybe this question will help you:
UITableView animate row reordering upon sort
You probably cannot use the tag for each TableCell, but I cannot see how you get your data for your cells so can't help you much there. If you use a model, you could add a field to define the sorting order.
Hope this helps you in the right direction!
I complete with my own question, thanks to Laura for provide me help where I found the way to do what I want. The main point of it - to use
[_tableView moveRowAtIndexPath:indFrom toIndexPath:indTo];
for it. There is exist some not easy things here with indexPaths of items currently not visible on screen, but main thing - cell move - os ok.

Is there a option to add a new row in shinobi grids?

First of all i am using shinobicontrols for developing interactive UI controls (Grids) for iOS using Objective c and please don't suggest me some other controls as an answer because i need to use only this.
I am half way stuck while using this control. i have downloaded demo code for grids provided by shinobicontrols (trial for 30 days). from : http://www.shinobicontrols.com/shinobigrids/product-tour/get-started-quickly-and-easily/
I was able to reorder rows and columns, edit contents of cell, re size column width by pinch gesture and much more.
But i couldn't add a new row or column to the existing grid. Just wanted to know whether this can be achieved.
Thanks in advance.
Edit the datasource (add/remove) item and just do [grid reload];
I think this should do.
The above answer seems to be correct. Adding my views Shinobi grids can be considered as UITableView cells, If you simply change the data source array of the tableview and call [tableview reloadData], number of cells displaying on the view will also change. There is no option to add a row still.
Look at this one. It is in alfa stage, but it will be quite a powerful in month or two, I would say. Any suggestions are welcome and it's free, of course. Number of rows and row content is fully controlled from delegate, so it is dynamic.

How make the same animation like UITableView reorder of cells?

I have a drag&drop operation between 2 UITableViews. The cell could be reordered in the source TableView, or move to another TableView.
Because I need to move the cell between the two, I can't use the default reorder support. However, I want to make a similar animation like when the cell is moving around and the cell below them slide out.
Any hint in how do this animation?
UPDATE:
You can see what exactly I'm looking for in the pulse app.
You can always use deleteRowsAtIndexPaths:withRowAnimation: to remove it from the source and insertRowsAtIndexPaths:withRowAnimation: to insert it into the destination.
if you want to do something similar to what makes "Pulse" you have to use "UIScrollView" for each row that you have and within the Views you need, if you do it UITableView is more complicated and would not be so easy to move between them

Resources