mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 14:43:43 +00:00
[ios] Fix track stats collection trailing inset
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
a88798fbf2
commit
f746ab2c2d
@@ -137,7 +137,7 @@ extension ElevationProfilePresenter {
|
|||||||
let width = collectionView.width
|
let width = collectionView.width
|
||||||
let cellHeight = collectionView.height
|
let cellHeight = collectionView.height
|
||||||
let modelsCount = CGFloat(descriptionModels.count)
|
let modelsCount = CGFloat(descriptionModels.count)
|
||||||
let cellWidth = (width - cellSpacing * (modelsCount - 1) - collectionView.contentInset.right) / modelsCount
|
let cellWidth = (width - cellSpacing * (modelsCount - 1) - collectionView.contentInset.right - collectionView.contentInset.left) / modelsCount
|
||||||
return CGSize(width: cellWidth, height: cellHeight)
|
return CGSize(width: cellWidth, height: cellHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ final class ElevationProfileViewController: UIViewController {
|
|||||||
// MARK: - Private methods
|
// MARK: - Private methods
|
||||||
|
|
||||||
private func setupViews() {
|
private func setupViews() {
|
||||||
view.styleName = "Background"
|
view.setStyle(.background)
|
||||||
setupDescriptionCollectionView()
|
setupDescriptionCollectionView()
|
||||||
setupChartView()
|
setupChartView()
|
||||||
}
|
}
|
||||||
@@ -84,6 +84,8 @@ final class ElevationProfileViewController: UIViewController {
|
|||||||
descriptionCollectionView.isScrollEnabled = false
|
descriptionCollectionView.isScrollEnabled = false
|
||||||
descriptionCollectionView.contentInset = Constants.descriptionCollectionViewContentInsets
|
descriptionCollectionView.contentInset = Constants.descriptionCollectionViewContentInsets
|
||||||
descriptionCollectionView.translatesAutoresizingMaskIntoConstraints = false
|
descriptionCollectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
descriptionCollectionView.showsHorizontalScrollIndicator = false
|
||||||
|
descriptionCollectionView.showsVerticalScrollIndicator = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private func layoutViews() {
|
private func layoutViews() {
|
||||||
|
|||||||
Reference in New Issue
Block a user