Files
Commercialization.topon/AnyThinkAds/Platform/iOS/Internal/C/ATUnityUtilities.h
2023-09-04 16:57:46 +08:00

52 lines
1.5 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// ATUnityUtilities.h
// UnityContainer
//
// Created by Martin Lau on 14/08/2018.
// Copyright © 2018 Martin Lau. All rights reserved.
//
#import <UIKit/UIKit.h>
extern NSString *const kATUnityUtilitiesInterstitialImpressionNotification;
extern NSString *const kATUnityUtilitiesInterstitialCloseNotification;
extern NSString *const kATUnityUtilitiesRewardedVideoImpressionNotification;
extern NSString *const kATUnityUtilitiesRewardedVideoCloseNotification;
extern NSString *const kATUnityUtilitiesAdShowingExtraScenarioKey;
extern NSString *const kATUnityUserExtraDataKey;
extern NSString *const kATUnityCheckLoadModelAdInfoKey;
@interface ATUnityUtilities : NSObject
+(BOOL)isEmpty:(id)object;
@end
@interface NSDictionary (KAKit)
-(NSString*) jsonString;
// 过滤SDK返回参数的 user_load_extra_data 中不支持的类型
-(NSString*) jsonFilterString;
-(BOOL)containsObjectForKey:(id)key;
@end
@interface NSArray (KAKit)
-(NSString*) jsonString;
// 过滤SDK返回参数的 user_load_extra_data 中不支持的类型
-(NSString*) jsonFilterString;
@end
@interface NSData(ATKit)
+(instancetype) dataWithUTF8String:(const char*)string;
@end
@interface UIColor (Hex)
// 透明度固定为1以0x开头的十六进制转换成的颜色
+ (UIColor *)colorWithHex:(long)hexColor;
// 0x开头的十六进制转换成的颜色,透明度可调整
+ (UIColor *)colorWithHex:(long)hexColor alpha:(float)opacity;
// 颜色转换三iOS中十六进制的颜色以#开头转换为UIColor
+ (UIColor *) colorWithHexString: (NSString *)color;
@end