【发布时间】:2015-02-13 19:17:31
【问题描述】:
在我的集合视图布局(UICollectionViewFlowLayout 的子类)内部我定义了:
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds {
return YES;
}
我的期望是,由于旋转是一个边界变化,我的布局将被重新计算。但是,当我在以下位置设置断点时:
- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout *)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
屏幕旋转时不触发断点。有谁知道为什么?
【问题讨论】:
标签: ios ios8 uikit uicollectionview