Files
MapLibreParticleLab/platform/ios/NSString+MGLAdditions.h
Minh Nguyễn 6a1e7d5707 Fixed race condition after setting access token
`Map` should be able to deal with having no access token or JSON even while it’s running. Most of `Map` accounts for this situation, but `reloadStyle()` incorrectly assumes that one or the other is set. This change corrects the assumption in `reloadStyle()`.

Also expose the access token and style name to clients as ordinary KVO-compliant properties. Actually, they’re not so ordinary because they’re inspectable!

Ref #1070, #1147
2015-04-03 12:07:53 -07:00

9 lines
173 B
Objective-C

#import <Foundation/Foundation.h>
@interface NSString (MGLAdditions)
/// Returns the receiver if non-empty or \c nil if empty.
- (NSString *)mgl_stringOrNilIfEmpty;
@end