systemLayoutSizeFittingSize: does not work correctly on Xcode 6 or iOS 8
Originator: | eugene |
|
Number: | rdar://17962954 |
Date Originated: | 8-8-2014 |
Status: | Open |
Resolved: | |
Product: | Developer Tools |
Product Version: | |
Classification: | |
Reproducible: | Always |
Summary:
When calculating dynamic UICollectionViewCell sizes, systemLayoutSizeFittingSize: works on Xcode 5, but does not work in Xcode 6, iOS 7.1+:
Providing the argument UILayoutFittingCompressedSize will yield a size of height zero.
Providing the argument UILayoutFittingExpandedSize will yield a size of height 10000.
(Possible duplicate of #17772725)
Steps to Reproduce:
Please see attached sample project, or download from here: http://cl.ly/200M2n0M0N1h
Run the project
Expected Results:
You should see three cells "One liner" "Two Liner, Two Liner" and "Three Liner, Three Liner, Three Liner".
Actual Results:
Using Xcode 5, run the project. You will see three cells "One liner" "Two Liner, Two Liner" and "Three Liner, Three Liner, Three Liner".
Using Xcode 6, (targetting iOS 7.1 or iOS 8.0) running the same project, you will see no cells. NSLogs will expose that those sizes are zero.
Version:
Version 6.0 (6A279r)
Software OS X 10.9.4 (13E28)
Notes:
Xcode Version 5.1.1 (5B1008)
Configuration:
MacBook Pro: Retina, 15-inch, Late 2013
Processor 2.6 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
Graphics NVIDIA GeForce GT 750M 2048 MB
Attachments:
'ZeroSizeCollectionViewCell.zip' was successfully uploaded.
Duplicates
Comments
ag9zfm9wZW5yYWRhci1ocmRyEgsSBVJhZGFyGICAgMDZ27kKDA
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!