BBASMUtils.h
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// BBASMUtils.h
// BaiduMobAdVideoSdk
//
// Created by baidu on 4/6/12.
// Copyright (c) 2012 Baidu. All rights reserved.
//
#import "NSData+BBASMBase64.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BBASMAdErrorHandler.h"
#import <WebKit/WebKit.h>
@interface BBASMUtils : NSObject {
}
+ (NSString *)base64forString:(NSString *)theString;
+ (id)objectFromDict:(NSDictionary *)adData
withKey:(NSString *)aKey
withDefault:(id)defObj;
+ (id)handleEmptyValue:(id)value withDefaut:(id)defObj;
+ (NSString *)urlEncodeString:(NSString *)str;
+ (void)sendLogwithLogUrl:(NSString *)log retry:(BOOL)retry;
+ (NSString *)md5:(NSString *)str;
+ (NSString *)userAgent;
+ (BOOL)isAvailableUrl:(NSString *)url;
+ (NSString *)urlDecodeComponent:(NSString *)str;
+ (double)systemVersion;
+ (BOOL)stringIsAllNumbers:(NSString *)string;
+ (void)setWebView:(WKWebView *)webView scrollsToTop:(BOOL)scrollsToTop;
+ (void)setWebView:(WKWebView *)webView scrollEnabled:(BOOL)scrollEnabled;
+ (BOOL)isNilOrEmptyString:(NSString *)str;
+ (void)openURL:(NSString *)urlString completionHandler:(void (^)(BOOL isInstall,BOOL success,int isCancel))completion;
+ (NSString *)repairJSONforJS:(NSString *)json;
+ (NSString *)parseDictionaryToJSON:(NSDictionary *)dictionary;
+ (NSString *)parseObjToJSON:(id)obj;
+ (BOOL)isAppStoreUrlString:(NSString *)urlString;
+ (BOOL)isStringPureInt:(NSString *)aString;
+ (UIColor *)colorWithHexString:(NSString *)color alpha:(CGFloat)alpha;
+ (UIColor *)colorWithHexString:(NSString *)color;
+ (BOOL)isArray:(id)target;
+ (BOOL)isDictionary:(id)target;
+ (BOOL)isNumber:(id)target;
+ (BOOL)isString:(id)target;
+ (long)timeSecondsSince1970;
@end