Doc of CALayer.contentsScale is incorrect
Originator: | an00na | ||
Number: | rdar://22595655 | Date Originated: | 06-Sep-2015 11:08 AM |
Status: | Open | Resolved: | |
Product: | Documentation | Product Version: | |
Classification: | Other Bug | Reproducible: | Not Applicable |
Summary: “For layers attached to a view, the view changes the scale factor automatically to a value that is appropriate for the current screen.” It means on 2x screen UIView.layer.contentsScale should bet set to 2.0 by view system automatically. However, it is not true for UIView with custom layer class — it is 1.0. It only becomes 2.0 if UIView’s drawRect(:) is overridden. Steps to Reproduce: 1. Launch sample app. 2. Read console logs. 3. Uncomment line 23 of View.swift. 4 Repeat 1~2 to see the correct result. Sample code: http://cl.ly/3V2x2y1O1M29
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!