Items moved down in UICollectionView inside UINavigationController

Originator:jaherhi
Number:rdar://23648291 Date Originated:23-Nov-2015 02:19 PM
Status:Open Resolved:No
Product:iOS SDK Product Version:Xcode 7.1.1 (7B1005)
Classification:N/A Reproducible:Always
 
Summary:
Using storyboards, the position for the items in a UICollectionView turns out to be wrong when the UICollectionView is a subview of a UIViewController embeded in a UINavigationController.

Steps to Reproduce:
1. Open the sample code
2. Run the app

Expected Results:
The items in UICollectionView should appear with a distance of zero from the top

Actual Results:
The items in UICollectionView appear with some distance from the top, approximately the size of the navigation bar

Version:
Xcode Version 7.1.1 (7B1005)
iPhone 5 iOS 9.1 (13B143)
Simulator iOS 9.1 (13B137)
OS X 10.11.1 (15B42)

Notes:
The workaround is to set the top constraint to a value of -64

Configuration:
This happens on both the iOS Simulator and a device

Sample app: https://github.com/jaherhi/radar.apple.com/tree/master/23648291-UICollectionViewWrongLayout

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!