Apples Collection Programming Guide for iOS says (with my emphasis):
Decorations are visual decorations that enhance the look of collections. Unlike cells and additional views, decor views provide only visual content and therefore are independent of the data source. You can use them to create custom backgrounds, fill in the spaces around the cells, or even hide the cells if you want.
Therefore, the decor should be ideal for dividers. Additional views are not suitable because the data source does not need to configure each separator.
However, if your requirements are not too strict, adding separators to cells may be easier to implement. Do you need to hide the delimiter before the first or after the last element? If this is not important, you can add separators to the cells and do it in a few minutes.
Update:. I found insertion and deletion animations when using decorative representations, since the delimiters did not work well, so it is not recommended to use decorations if you need animated updates.
source share