Incorrect size returned from systemLayoutSizeFittingSize: for UICollectionViewCells in iOS 7
| Originator: | danielctull | ||
| Number: | rdar://18303829 | Date Originated: | 11-Sep-2014 11:44 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | Xcode 6 GM |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Calling systemLayoutSizeFittingSize on a UICollectionViewCell that has layout constraints that define a valid height returns 0 for the height. The same layout works fine for regular UIViews and also works fine in iOS 8. Steps to Reproduce: See sample code. A cell is loaded from a nib. The cell has a fixed height defined with a layout constraint. systemLayoutSizeFittingSize is called on the cell. Expected Results: Run the sample app on an iOS 7 device or simulator and the call to the cell’s systemLayoutSizeFittingSize method should return a height of 100 Actual Results: The call to systemLayoutSizeFittingSize returns a height of 0. **Regression**: I filed rdar://18047251 original where this bug occurred on iOS 8 devices and simulators, but was fine (and always worked on past versions of Xcode) on iOS 7 devices and simulators. Even on Xcode 6 beta 7, this call worked on iOS 7. Now it fails.
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!