UIFont should be compatible with IBInspectable
| Originator: | keithbsmiley | ||
| Number: | rdar://33583836 | Date Originated: | 27-Jul-2017 21:30 |
| Status: | Duplicate of 15333827 (open) | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 9 beta 4 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: Currently if you have a custom control that requires a font be set, and you include it from a storyboard, there is no good way to customize the font using IBInspectables. Steps to Reproduce: 1. Create a UIView subclass, and add this property: ``` @IBInspectable var font: UIFont! ``` 2. Add a view of your class, and attempt to set this property Expected Results: You get a font picker for the property just like when you're customizing the font of a UILabel Actual Results: This property isn't customizable using interface builder Version: Xcode 9 beta 4 Notes: We're currently working around this by making multiple properties for the font name and the font size, and then, based on the string, building the font in code. This is obviously a lot more overhead and is much more error prone.
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!