UICollectionView is too wide. How can i make it the width of the device?
I created a new UICollectionView in the storyboard. My problem is that the cells try and fit a larger width than the width of the device, so the ones on the right get cut off. What’s a good way to fix this?
- What tool(s) can I use to produce iPhone App Screencasts?
- How can I properly document a method with a completion handler in iOS swift
- How to change IOS badge notification colour from default Red to other colours?
- UITableView content overlaps Status Bar when UISearchBar is active
- iOS9 self.canDisplayBannerAds = true is not showing any ads
- Alamofire custom parameters
2 Solutions Collect From Internet About “UICollectionView is too wide. How can i make it the width of the device?”
you need to pinned all edges of your UICollectionview…check out here
By pinned all edges, you’ll get equal height and width of screen
You need to add the proper constraints to your collection view. If you want it to be the width of the screen, then add 0 length spacing constraints to both edges of the controller’s self.view (top and bottom as well if you want it full height).
- Selector not called on selecting menu item after force touch
- Integrate Linphone in own iOS project
- Swift UIColor initializer – compiler error only when targeting iPhone5s
- After rotation UIView coordinates are swapped but UIWindow's are not?
- iOS: SVProgressHUD doesnt dismiss when user moves from one screen to another in IOS Xcode
- Changing The value of struct in an array
- iTunes account creation not allowed when trying to test In-App Purchases
- Allow UIScrollView and its subviews to both respond to a touch
- Appstore FailureNo architectures in the binary. Lipo failed to detect any architectures in the bundle executable.” At SoftwareAssets/SoftwareAsset
- Can I extend Tuples in Swift?
- How to turn on/off auto layout for a single view controller in storyboard
- How to loop through JSON with SwiftyJSON?
- iOS blur effect to ImageView with Swift
- UITextView just horizontal scrolling help
- Swift pass struct by reference?