Kaunteya
Kaunteya

Reputation: 3090

setter selectors does not autocomplete in swift

How do I call the set methods in swift. They dont autocomplete
For eg:
As per NSProgressIndicator Class Reference
it has 2 selectors doubleValue and setDoubleValue.
How do I call setDoubleValue, also it does not auto completes
Is it recommended to use obj.doubleValue to get and set the property ?

Upvotes: 1

Views: 149

Answers (1)

HAS
HAS

Reputation: 19853

Is it recommended to use obj.doubleValue to get and set the property?

It is not only recommended but actually necessary to call it like

obj.doubleValue

As the documentation states, in Swift the getter/setter is converted to

var doubleValue: Double

This is the case for pretty much every Objc-property.

Upvotes: 1

Related Questions