Frame size of UICollectionView is bigger than size of UIScreen
问题 In viewDidLoad func of my UIViewController I call print("\(UIScreen.main.bounds.size.width) \(collectionView.frame.width)") and it prints 320.0 375.0 How is it possible? UICollectionView should has the same width, mb smaller but definitely not bigger Settings of this view in storyboard: each constraint set as So I test it on iPhone SE Simulator but in Storyboard I have iPhone 8. But I believe it should not matter at all when I use autolayout (constraints to make size of my view match size of