[ios] Fix track stats collection trailing inset

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn
2025-06-17 12:43:32 +04:00
committed by Konstantin Pastbin
parent a88798fbf2
commit f746ab2c2d
2 changed files with 4 additions and 2 deletions

View File

@@ -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)
} }

View File

@@ -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() {