ios - I need help animating UICollectionView cell size when collection view size changes -
i have uicollectionview
takes entire screen, , inside cells same exact size collection view. when user hits button, collection view animates take half screen (and view shown beside it). fine, cells still size of original collection view.
i can call invalidatelayout
on collection view's layout, , cause collectionview:layout:sizeforitematindexpath:
called , cells recalcualted, , sizes changes, these not animate, snap new size.
is there way animate these cell size changes @ same time, or in same animation block animates size change parent collection view?
[_collectionview performbatchupdates:^{ (int =0; i<count; i++) { nsindexpath *indexpath = [nsindexpath indexpathforrow:i insection:0]; uicollectionviewcell *cell = [_collectionview cellforitematindexpath:indexpath]; cell.layer.transform = catransform3dmakescale(0.9, 0.9, 1); } } completion:nil];
Comments
Post a Comment