Is there a way to access the raw field value of a ...
# announcements
d
Is there a way to access the raw field value of a
var
bypassing a getter? See the code
p
Declare private property
Copy code
private var _aspectRatio: Float = 0f
and use it instead of backing field
field
in getter and setter of
aspectRatio
property. Then you can use raw value (i.e.
_aspectRatio
property) in your function.
d
yes I did that, thanks, I was hoping there was another way 🙂