IBInspectable should support UIFont
| Originator: | clafou | ||
| Number: | rdar://22835760 | Date Originated: | 2015-09-24 |
| Status: | Closed | Resolved: | Duplicate |
| Product: | Xcode | Product Version: | 7 |
| Classification: | Developer Tools | Reproducible: | Not Applicable |
Summary:
Interface Builder provides a font chooser for stock controls, but when designing a custom UIView with IBInspectable attributes, UIFont properties marked IBInspectable are ignored.
This leaves developers unable to make a font customizable for their controls in Interface Builder (it is possible to provide two properties instead: font name and font size, but these are error-prone and not user-friendly)
Steps to Reproduce:
Create a UIView subclass as follows:
@IBDesignable
class CounterView: UIView {
@IBInspectable var font: UIFont?
}
Include it in a storyboard and select it to customise it.
Expected Results:
The Attributes Inspector should include a font selection control.
Actual Results:
No font selection control is displayed in the Attributes Inspector.
Version:
Xcode 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!
Duplicate of 15860774
Closed by Apple as duplicate of 15860774 (Open)