Skip to content

Commit fcdf2ac

Browse files
author
dujianwei
committed
rm no used code
1 parent 919f10e commit fcdf2ac

File tree

4 files changed

+6
-27
lines changed

4 files changed

+6
-27
lines changed

UIView+Utils.podspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
Pod::Spec.new do |s|
44

5-
s.platform = :ios
6-
# s.platform = :ios, "5.0"
5+
s.platform = :ios, "7.0"
76
s.name = "UIView+Utils"
8-
s.version = "0.0.1"
7+
s.version = "0.0.2"
98
s.summary = "Utils for UIView , including categories for frame, border color."
109
s.homepage = "https://github.com/bitmess/UIView-Utils"
1110
s.license = "MIT"
Binary file not shown.

UIView+Utils/Classes/UIView+Utils.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
- (void) removeAllSubviews;
3737

3838
#pragma mark - transform
39-
CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);
4039
- (void) moveBy: (CGPoint) delta;
4140
- (void) scaleBy: (CGFloat) scaleFactor;
4241
- (void) fitInSize: (CGSize) aSize;
@@ -55,8 +54,4 @@ CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);
5554
- (void) magentaBorder;
5655
- (void) borderByColor:(UIColor *)color;
5756

58-
#pragma mark - class method
59-
60-
+ (CAShapeLayer *)createCircleLayerWithWidth:(double)width about:(double)about;
61-
6257
@end

UIView+Utils/Classes/UIView+Utils.m

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
@implementation UIView (Utils)
1212

13+
#pragma mark - frame
14+
1315
- (CGFloat) left
1416
{
1517
return self.frame.origin.x;
@@ -133,7 +135,7 @@ - (void)setSize:(CGSize)size
133135
}
134136

135137

136-
#pragma mark subviews
138+
#pragma mark - subviews
137139

138140
- (void)removeAllSubviews
139141
{
@@ -143,16 +145,8 @@ - (void)removeAllSubviews
143145
}
144146

145147

146-
#pragma mark transform
148+
#pragma mark - transform
147149

148-
CGRect CGRectMoveToCenter(CGRect rect, CGPoint center)
149-
{
150-
CGRect newrect = CGRectZero;
151-
newrect.origin.x = center.x-CGRectGetMidX(rect);
152-
newrect.origin.y = center.y-CGRectGetMidY(rect);
153-
newrect.size = rect.size;
154-
return newrect;
155-
}
156150

157151
- (void) moveBy: (CGPoint) delta
158152
{
@@ -244,14 +238,5 @@ - (void) borderByColor:(UIColor *)color {
244238
self.layer.borderWidth = 1.f;
245239
}
246240

247-
+ (CAShapeLayer *)createCircleLayerWithWidth:(double)width about:(double)about
248-
{
249-
CAShapeLayer *circleShape = [CAShapeLayer layer];
250-
double radius = width / 2.f;
251-
UIBezierPath *circlePath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(radius, radius) radius:radius + about startAngle:0 endAngle:2 * M_PI clockwise:YES];
252-
circleShape.path = [circlePath CGPath];
253-
return circleShape;
254-
}
255-
256241

257242
@end

0 commit comments

Comments
 (0)