Keeping the contentOffset in a UICollectionView while rotating Interface Orientation

后端 未结 24 1359
野性不改
野性不改 2020-12-04 07:22

I\'m trying to handle interface orientation changes in a UICollectionViewController. What I\'m trying to achieve is, that I want to have the same contentOffset afte

24条回答
  •  抹茶落季
    2020-12-04 08:04

    I had the issue with my project,i used two different layout for the UICollectionView.

    mCustomCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"LandScapeCell" forIndexPath:indexPath];
    
    theCustomCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"PortraitCell" forIndexPath:indexPath];
    

    Then Check it for each orientation and use your configuration for each orientation.

提交回复
热议问题