萤石云 iOSSDK,移植跨平台相关工程
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
//
//  UIView+DDKit.h
//  DDCategory
//
//  Created by DeJohn Dong on 15-3-20.
//  Copyright (c) 2015年 DDKit. All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
@interface UIView (DDKit)
 
@end
 
typedef NS_OPTIONS(NSUInteger, ViewSeparatorType) {
    ViewSeparatorTypeTop             = 1 << 0,
    ViewSeparatorTypeLeft            = 1 << 1,
    ViewSeparatorTypeBottom          = 1 << 2,
    ViewSeparatorTypeRight           = 1 << 3,
    ViewSeparatorTypeVerticalSide    = 1 << 4,
    ViewSeparatorTypeHorizontalSide  = 1 << 5,
    ViewSeparatorTypeAll             = 1 << 6
};
 
#ifndef SeparatorWidth
#define SeparatorWidth (1.0/[UIScreen mainScreen].scale)
#endif
 
@interface UIView (DDSeparator)
 
/**
 *  Add the separator line on the view
 *
 *  @param type view-separtor-type
 */
- (void)dd_addSeparatorWithType:(ViewSeparatorType)type;
 
/**
 *  Add the separator line on the view
 *
 *  @param type  view-separtor-type
 *  @param color line-color
 */
- (void)dd_addSeparatorWithType:(ViewSeparatorType)type withColor:(UIColor *)color;
 
/**
 *  Instance a horizontal line with the width
 *
 *  @param width line-width
 *
 *  @return a horizontal line imageView
 */
+ (UIImageView *)dd_instanceHorizontalLine:(CGFloat)width;
 
/**
 *  Instance a horizontal line with the width & color
 *
 *  @param width line-width
 *  @param color line-color
 *
 *  @return a horizontal line imageView
 */
+ (UIImageView *)dd_instanceHorizontalLine:(CGFloat)width color:(UIColor *)color;
 
/**
 *  Instance a vertical line with the height
 *
 *  @param height line-height
 *
 *  @return a vertical line imageView
 */
+ (UIImageView *)dd_instanceVerticalLine:(CGFloat)height;
 
/**
 *   instance a vertical line with the height & color
 *
 *  @param height line-height
 *  @param color linet-color
 *
 *  @return a vertical line imageView
 */
+ (UIImageView *)dd_instanceVerticalLine:(CGFloat)height color:(UIColor *)color;
 
 
@end
 
 
@interface UIView (DDNib)
 
/**
 *  Load a view from nib file
 *
 *  @return initlialized view object
 */
+ (id)dd_loadFromNIB;
 
@end
 
@interface UIView (DD_MBProgressHUD)
 
/**
 *  Show only text HUD View
 *
 *  @param message The message text
 */
- (void)dd_showMessageHUD:(NSString *)message;
 
/**
 *  Remove the HUD
 */
- (void)dd_removeHUD;
 
/**
 *  Show only text HUD View with class method
 *
 *  @param message message text
 */
+ (void)dd_showMessage:(NSString *)message;
 
/**
 *  Show only the HUD View on any parentView
 *
 *  @param message   message text
 *  @param parentView parentView
 */
+ (void)dd_showMessage:(NSString *)message onParentView:(UIView *)parentView;
 
/**
 *  Show detail text HUD View
 *
 *  @param message message text
 */
+ (void)dd_showDetailMessage:(NSString *)message;
 
/**
 *  Show detail text HUD View on any parentView
 *
 *  @param message   message text
 *  @param parentView parentView
 */
+ (void)dd_showDetailMessage:(NSString *)message onParentView:(UIView *)parentView;
 
@end
 
@interface UIView (DDScreenshot)
 
/**
 *  Get a screenshot from a view with Y offset
 *
 *  @param deltaY offset Y
 *
 *  @return The screenshot image.
 */
- (UIImage *)dd_screenshotWithOffsetY:(CGFloat)deltaY;
 
/**
 *  Get a screenshot with all the partern of view.
 *
 *  @return The screenshot image
 */
- (UIImage *)dd_screenshot;
 
@end
 
@interface UIView (DDCornerRadius)
 
/**
 *  Add corner radius layer on the view
 *
 *  @param radius The radius width
 */
- (void)dd_addCornerRadius:(CGFloat)radius;
 
/**
 *  Add corner radius layer on the view with line color
 *
 *  @param radius    The radius width
 *  @param lineColor The line color
 */
- (void)dd_addCornerRadius:(CGFloat)radius lineColor:(UIColor *)lineColor;
 
@end