From 7473ff0b1d43b790ef23ae03de80e40537fae2af Mon Sep 17 00:00:00 2001 From: Igor Kislyuk Date: Thu, 30 Mar 2017 17:53:14 +0300 Subject: [PATCH] Fix. Add more space for label --- Segmentio/Source/Cells/SegmentioCell.swift | 4 ++-- Segmentio/Source/Cells/SegmentioCellWithLabel.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Segmentio/Source/Cells/SegmentioCell.swift b/Segmentio/Source/Cells/SegmentioCell.swift index af70d89..b7c04c0 100644 --- a/Segmentio/Source/Cells/SegmentioCell.swift +++ b/Segmentio/Source/Cells/SegmentioCell.swift @@ -191,7 +191,7 @@ class SegmentioCell: UICollectionViewCell { attribute: .trailing, relatedBy: .equal, toItem: containerView, - attribute: .trailingMargin, + attribute: .trailing, //changed from .trailingMargin. remove std margin 8pt multiplier: 1.0, constant: 0 ) @@ -200,7 +200,7 @@ class SegmentioCell: UICollectionViewCell { attribute: .leading, relatedBy: .equal, toItem: containerView, - attribute: .leadingMargin, + attribute: .leading, //changed from .leadingMargin. remove std margin 8pt multiplier: 1.0, constant: 0 ) diff --git a/Segmentio/Source/Cells/SegmentioCellWithLabel.swift b/Segmentio/Source/Cells/SegmentioCellWithLabel.swift index ab47b8a..0fcdc54 100644 --- a/Segmentio/Source/Cells/SegmentioCellWithLabel.swift +++ b/Segmentio/Source/Cells/SegmentioCellWithLabel.swift @@ -22,7 +22,7 @@ final class SegmentioCellWithLabel: SegmentioCell { // main constraints let segmentTitleLabelHorizontConstraint = NSLayoutConstraint.constraints( - withVisualFormat: "|-[containerView]-|", + withVisualFormat: "|[containerView]|", //changed from |-[containerView]-|. remove standard space options: [.alignAllCenterX], metrics: nil, views: views