UIPrintPageRender directly accesses header and footer IVARs instead of calling getters
| Originator: | oliver.drobnik | ||
| Number: | rdar://16108174 | Date Originated: | Feb 19, 2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.0.5 (11B601) |
| Classification: | Other Bug | Reproducible: | Always |
Summary: As a developer I expect to be able to provide an overridden getter for -headerHeight or -footerHeight properties to specify the heights. Steps to Reproduce: 1. Create a UIPrintPageRenderer subclass 2. Override -numberOfPages to return 1 3. Override -headerHeight to return a value > 0 4. Override -drawHeaderForPageAtIndex:inRect: to draw a box Expected Results: The -headerHeight getter should be called for determining the header height. Actual Results: The -headerHeight getter is never called. If you instead set it via self.headerHeight = value then this works. Version: 7.0.5 (11B601) Notes: From this we can conclude that the implementation directly references the _headerHeight IVAR instead of retrieving the value via property. This leads to developer confusion because reading the header you expect to be able to override getters to provide such values, especially because you need to create a new subclass for your custom printing implementation. Configuration: iOS 7
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!