GLMapValue


@interface GLMapValue : NSObject

GLMapValue is a class that hold some value and can convert it to Obj-C or Swift value

  • Initialize value with string.

    Declaration

    Objective-C

    - (instancetype _Nullable)initWithString:(NSString *_Nonnull)string;
  • Converts value to float, or NAN on failure.

    Declaration

    Objective-C

    - (CGFloat)asFloat;

    Return Value

    Float value

  • Converts value to string.

    Declaration

    Objective-C

    - (NSString *_Nullable)asString;

    Return Value

    String value

  • Converts value to bool.

    Declaration

    Objective-C

    - (BOOL)asBool;

    Return Value

    Bool value

  • Converts value to color

    Declaration

    Objective-C

    - (UIColor *_Nullable)asColor;

    Return Value

    Color value or nil on failure

  • Used for values returned by offline search. When part of value is matched during search, this functions returns NSAttributedString with higlighted parts.

    Declaration

    Objective-C

    - (NSAttributedString *_Nullable)
        asAttributedString:(NSDictionary *_Nonnull)normalAttributes
                 highlight:(NSDictionary *_Nonnull)highlightAttributes;

    Parameters

    normalAttributes

    Normal attributes

    highlightAttributes

    Highlight attributes

    Return Value

    Name value with highlighted parts