Is it possible to set floating point value in Attributes Inspector? I have this property in my UIView:
@IBInspectable
var scale: CGFloat = 0.90 {
didSet {
setNeedsDisplay()
}
}
As you can see, default value is 0.9 and I would like to change it in Attributes Inspector, but it looks like that:
And I am only able to set integer values in there. Am I missing something?
You can set it. What worked for me was using a comma when entering the number instead of a period. And as commented by @Alladinian:
[T]he decimal separator [might just be] locale (region) dependant.
Here it's 0,5
, not 0.5
:
Here it's 0,8
, not 0.8
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With