Constraints Removing SegmentController from view
问题 I have a UICollectionView and a SegmentController . The required end result: SegmentController fully in view, UICollectionView beneath it Before adding constraints: After adding constraints (Notice the SegmentController is almost entirely hidden): The Constraints added: ProductsCollection.removeConstraints(ProductsCollection.constraints) SegmentController.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ SegmentController.centerXAnchor.constraint(equalTo: view