1 // Copyright 2016-present 650 Industries. All rights reserved. 2 3 #import <UIKit/UIKit.h> 4 #import "EXScopedBridgeModule.h" 5 #import "EXScopedModuleRegistry.h" 6 7 @interface EXUtil : EXScopedBridgeModule 8 9 + (nullable NSString *)escapedResourceName:(nullable NSString *)name; 10 + (void)performSynchronouslyOnMainThread:(nonnull void (^)(void))block; 11 + (nonnull NSString *)hexStringWithCGColor:(nullable CGColorRef)color; 12 + (nonnull UIColor *)colorWithRGB:(unsigned int)rgbValue; 13 14 /** 15 * Expects @"#ABCDEF" 16 */ 17 + (nullable UIColor *)colorWithHexString:(nullable NSString *)hexString; 18 19 - (nullable UIViewController *)currentViewController; 20 21 @end 22 23 @protocol EXUtilService 24 25 - (nullable UIViewController *)currentViewController; 26 - (nullable NSDictionary *)launchOptions; 27 28 @end 29 30 EX_DECLARE_SCOPED_MODULE_GETTER(EXUtil, util) 31