में सभी UICollectionViewCells को एनिमेट करना मैं सोच रहा था कि UICollectionView में सभी कक्षों को एनिमेट करने का एक अच्छा तरीका क्या है। मैं एक UICollectionView में संपादन अनुकरण करने की कोशिश कर रहा हूँ। तो मैं क्या करना चाहता हूं UICollectionViewCells की सभी सीमाओं को कम करना है। तो क्या मैं यह है:एक UICollectionView
- (IBAction)startEditingMode:(id)sender {
[_items enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx inSection:0];
UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:indexPath];
[UIView animateWithDuration:0.25 animations:^{
cell.layer.transform = CATransform3DMakeScale(0.9, 0.9, 1);
}];
}];
}
यह काम करता है, लेकिन मुझे यकीन है कि अगर वहाँ UICollectionView पर एक संपत्ति, या इस तरह कुछ करने के लिए एक बेहतर और अधिक मानक तरीका था नहीं था। धन्यवाद।