MGLConstantStyleValue
@interface MGLConstantStyleValue <T> : MGLStyleValue<T>
An MGLConstantStyleValue object is a generic container for a style attribute
value that remains constant as the zoom level changes. The layout and paint
attribute properties of MGLStyleLayer objects can be set to
MGLConstantStyleValue objects.
The MGLConstantStyleValue class takes a generic parameter T that indicates
the Foundation class being wrapped by this class.
-
Creates and returns an
MGLConstantStyleValueobject containing a raw value.Declaration
Objective-C
+ (nonnull instancetype)valueWithRawValue:(nonnull T)rawValue;Parameters
rawValueThe constant value contained by the object.
Return Value
An
MGLConstantStyleValueobject containingrawValue, which is treated as a constant value.
-
Returns an
MGLConstantStyleValueobject containing a raw value.Declaration
Objective-C
- (nonnull instancetype)initWithRawValue:(nonnull T)rawValue;Swift
init(rawValue: T)Parameters
rawValueThe value contained by the receiver.
Return Value
An
MGLConstantStyleValueobject containingrawValue.
-
The raw value contained by the receiver.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) T _Nonnull rawValue;Swift
var rawValue: T { get set }
Install in Dash
MGLConstantStyleValue Class Reference