Instance Method
setAttribute(_:forKey:) setAttribute:forKey: setAttribute_forKey_
Sets or removes an attribute.
Declaration
func setAttribute(_ value: Any?, forKey key: GSLayerAttribute)Declaration
- (void) setAttribute:(id) value forKey:(GSLayerAttribute) key;Declaration
setAttribute_forKey_(value: object, key: GSLayerAttribute)Parameters
valueA value that supports property-list encoding, or
nilto remove the attribute.
Discussion
Setting an attribute registers undo and notifies the glyph. Passing nil as the value removes the attribute.
See Also
Attributes
Values that configure layer behavior and special layer formats.
The number of attributes.
The value for an attribute key, or
nilif no value is set.Replaces all attributes without registering undo or notifying the glyph.
Sets an attribute without registering undo or notifying the glyph.
Removes an attribute.