Closed fumiyasac closed 4 years ago
Hey! Sorry for the late reply. I'll need more information to help you resolve this issue. Can you extract a sample out from your app that can reproduce this issue?
If it's too hard, do you mind sharing some of your code snippet? The most important parts are how you're adding images/texts to the UICollectionViewCell (if it's in code, do you add them to the cell itself or the cell's contentView
), how you're defining the size/padding (in a delegate or using itemSize
property) and how the xib file look like if you're using IB.
@KelvinJin Thank you for reply. Code snippet is below.
【Initialize CubeAttributesAnimator】
let layout = AnimatedCollectionViewLayout()
layout.animator = CubeAttributesAnimator()
layout.scrollDirection = .horizontal
collectionView.collectionViewLayout = layout
【UICollectionViewDelegateFlowLayout】
extension GalleryViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return .zero
}
}
My sample repository is below. Now I use RotateInOutAttributesAnimator, but it occurs when it changes CubeAttributesAnimator.
Hey @fumiyasac! Thanks for the repository. I was able to reproduce the issue. It's very strange that the demo works under iOS 13 but not your app. I'm not 100% sure but I think it's happening when UIKit reset the position of the content view but not the anchor point.
I've released a new version 1.0.1 and it should be available on CocoaPods. Can you please try that version and let me know if it works? Thanks!
@KelvinJin Thank you for new version 1.0.1. I tried new version, but it still not working when I used CubeAttributesAnimator. If you need, please refer to testing repository below. (There are many Japanese comments in the code, so I am sorry that it is difficult to read.)
Testing Repository:
@fumiyasac Hmm, I tested your app and it's working correctly for me on iOS 13. I tested on both a simulator and a device. Can you double check you cleaned the cache?
Check the following Gif. (I compressed it so it looks colourless)
@KelvinJin Thank you for handling it quickly!! I tried to execute cache clear $ rm -rf /Users/MyMacBookPro/Library/Developer/Xcode/DerivedData/
, it works collect.
Good to know! Thanks for submitting and helping with the diagnosis! I'll close the issue.
I am facing with same problem below ios 14. With 1.0.1 version it works below 14 but dont work with iOS 14 AnimatedCollectionViewLayout Version: 1.1.0 Xcode version: 12.2 Swift version: 5 Platform(s) running AnimatedCollectionViewLayout: iOS macOS version running Xcode: 11.0.1
Description
Hi,
I use this library and choose
CubeAttributesAnimator
in my iOS app, but screen display is strange. When I implement photo gallery with full screen, I can only see half photo. I think it seems to be caused by a bug of internal animation logics.thanks :)
Environments
AnimatedCollectionViewLayout Version: 1.0.0 Xcode version: 11.1 Swift version: 5.1 Platform(s) running AnimatedCollectionViewLayout: iOS macOS version running Xcode: 10.15.1
ScreenShots
Strange Finished Pagination:
Expected Collect State Finished Pagination: