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
func collectonView(_ collectionView: UICollectionView, mozaik layoyt: ADMozaikLayout, geometryInfoFor section: ADMozaikLayoutSection) -> ADMozaikLayoutSectionGeometryInfo { let W = self.view.frame.size.width/2 // - 10 let rowHeight: CGFloat = self.view.frame.size.width/12 //W //93 let columns = [ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W)] let geometryInfo = ADMozaikLayoutSectionGeometryInfo(rowHeight: rowHeight, columns: columns, minimumInteritemSpacing: 1, minimumLineSpacing: 1, sectionInset: UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 0), headerHeight: 1, footerHeight: 1) return geometryInfo }
func collectionView(_ collectionView: UICollectionView, mozaik layout: ADMozaikLayout, mozaikSizeForItemAt indexPath: IndexPath) -> ADMozaikLayoutSize { let image = photos[indexPath.row].image let aspectratio = image.size.width/image.size.height if aspectratio == 1/1 { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 6) } if aspectratio == 2/3 { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 9) } if aspectratio == 3/2 { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 4) } if aspectratio == 2/1 { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 3) } if aspectratio == 1/2 { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 12) } else { return ADMozaikLayoutSize(numberOfColumns: 1, numberOfRows: 6) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
func collectonView(_ collectionView: UICollectionView, mozaik layoyt: ADMozaikLayout, geometryInfoFor section: ADMozaikLayoutSection) -> ADMozaikLayoutSectionGeometryInfo {
let W = self.view.frame.size.width/2 // - 10
let rowHeight: CGFloat = self.view.frame.size.width/12 //W //93
let columns = [ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W), ADMozaikLayoutColumn(width: W)]
let geometryInfo = ADMozaikLayoutSectionGeometryInfo(rowHeight: rowHeight,
columns: columns,
minimumInteritemSpacing: 1,
minimumLineSpacing: 1,
sectionInset: UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 0),
headerHeight: 1, footerHeight: 1)
return geometryInfo
}
The text was updated successfully, but these errors were encountered: