I want to set some tokens in a NSTokenField, when it appears.
Apple document says: setObjectValue:
I try to set tokens usign setObjectValue
tokenField.setObjectValue(["One","Two"])
but it doesn't´t compile.
What´s the correct method?
I want to set some tokens in a NSTokenField, when it appears.
Apple document says: setObjectValue:
I try to set tokens usign setObjectValue
tokenField.setObjectValue(["One","Two"])
but it doesn't´t compile.
What´s the correct method?
Copyright © 2021 Jogjafile Inc.
objectValueis a property defined inNSControl. In Objective-C, you can set a value to it, in both property notation or setter methodsetObjectValue:. But in Swift, you always need to use property notation -- simple assignment: