Xcode 7.3: IBInspectable CGSize doesn't allow negative

Originator:flavio
Number:rdar://25935307 Date Originated:2016-04-26
Status:Resolved (Xcode 8 beta 4) Resolved:2016-07-28
Product:Developer Tools Product Version:7.3 (7D175)
Classification:UI/Usability Reproducible:Always
 
Summary:
If a CGSize property is set as @IBInspectable the Interface Builder doesn’t allow its values to be negative.

Steps to Reproduce:
1 - Subclass a UIView
2 - Create a CGSize property and annotate it as @IBInspectable
3 - Open the storyboard
4 - Create a view and set its class as the custom one.
5 - Try to set negative values for the size property.

Expected Results:
Considering that CGSize’s properties “width” and “height” are CGFloat, they should be allowed to be negative. This is emphasised by the SDK that does accept this behaviour with properties like CALayer’s “shadowRadius” who’s default value is (0, -3)

Actual Results:
The Interface Builder doesn’t allow the input to receive negative values

Version:
Xcode 7.3 (7D175)

Notes:


Configuration:


Attachments:

Comments

Resolved

This was resolved on Xcode 8 beta 4


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!