We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private func configureAttributes(for attributes: UICollectionViewLayoutAttributes) { guard let collection = collectionView else { return } var visibleRect = CGRect() visibleRect.origin = collection.contentOffset visibleRect.size = collection.bounds.size let collectionLeft = itemSize.width / 2 let offset = collection.contentOffset.x let normalizedLeft = attributes.center.x - offset let maxDistance = self.itemSize.width let distance = min(abs(collectionLeft - normalizedLeft), maxDistance) let ratio = (maxDistance - distance)/maxDistance let scale = ratio * (1 - sideItemScale) + sideItemScale var t = CATransform3DIdentity t = CATransform3DScale(t, scale, scale, 1.0) attributes.zIndex = Int(scale * 10) attributes.transform3D = t // change item space, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: