Authored by bibibi

replace uiview with mas_view

@@ -43,11 +43,11 @@ @@ -43,11 +43,11 @@
43 return; 43 return;
44 } 44 }
45 45
46 - UIView *tempSuperView = [self mas_commonSuperviewOfViews]; 46 + MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
47 if (axisType == AxisTypeHorizon) { 47 if (axisType == AxisTypeHorizon) {
48 - UIView *prev; 48 + MAS_VIEW *prev;
49 for (int i = 0; i < self.count; i++) { 49 for (int i = 0; i < self.count; i++) {
50 - UIView *v = [self objectAtIndex:i]; 50 + MAS_VIEW *v = [self objectAtIndex:i];
51 [v mas_makeConstraints:^(MASConstraintMaker *make) { 51 [v mas_makeConstraints:^(MASConstraintMaker *make) {
52 if (prev) { 52 if (prev) {
53 make.left.equalTo(prev.mas_right).offset(paddingSpace); 53 make.left.equalTo(prev.mas_right).offset(paddingSpace);
@@ -64,9 +64,9 @@ @@ -64,9 +64,9 @@
64 } 64 }
65 } 65 }
66 else { 66 else {
67 - UIView *prev; 67 + MAS_VIEW *prev;
68 for (int i = 0; i < self.count; i++) { 68 for (int i = 0; i < self.count; i++) {
69 - UIView *v = [self objectAtIndex:i]; 69 + MAS_VIEW *v = [self objectAtIndex:i];
70 [v mas_makeConstraints:^(MASConstraintMaker *make) { 70 [v mas_makeConstraints:^(MASConstraintMaker *make) {
71 if (prev) { 71 if (prev) {
72 make.top.equalTo(prev.mas_bottom).offset(paddingSpace); 72 make.top.equalTo(prev.mas_bottom).offset(paddingSpace);
@@ -89,11 +89,11 @@ @@ -89,11 +89,11 @@
89 return; 89 return;
90 } 90 }
91 91
92 - UIView *tempSuperView = [self mas_commonSuperviewOfViews]; 92 + MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
93 if (axisType == AxisTypeHorizon) { 93 if (axisType == AxisTypeHorizon) {
94 - UIView *prev; 94 + MAS_VIEW *prev;
95 for (int i = 0; i < self.count; i++) { 95 for (int i = 0; i < self.count; i++) {
96 - UIView *v = [self objectAtIndex:i]; 96 + MAS_VIEW *v = [self objectAtIndex:i];
97 [v mas_makeConstraints:^(MASConstraintMaker *make) { 97 [v mas_makeConstraints:^(MASConstraintMaker *make) {
98 if (prev) { 98 if (prev) {
99 CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength; 99 CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength;
@@ -112,9 +112,9 @@ @@ -112,9 +112,9 @@
112 } 112 }
113 } 113 }
114 else { 114 else {
115 - UIView *prev; 115 + MAS_VIEW *prev;
116 for (int i = 0; i < self.count; i++) { 116 for (int i = 0; i < self.count; i++) {
117 - UIView *v = [self objectAtIndex:i]; 117 + MAS_VIEW *v = [self objectAtIndex:i];
118 [v mas_makeConstraints:^(MASConstraintMaker *make) { 118 [v mas_makeConstraints:^(MASConstraintMaker *make) {
119 if (prev) { 119 if (prev) {
120 CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength; 120 CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength;
@@ -134,13 +134,13 @@ @@ -134,13 +134,13 @@
134 } 134 }
135 } 135 }
136 136
137 -- (UIView *)mas_commonSuperviewOfViews 137 +- (MAS_VIEW *)mas_commonSuperviewOfViews
138 { 138 {
139 - UIView *commonSuperview = nil;  
140 - UIView *previousView = nil; 139 + MAS_VIEW *commonSuperview = nil;
  140 + MAS_VIEW *previousView = nil;
141 for (id object in self) { 141 for (id object in self) {
142 - if ([object isKindOfClass:[UIView class]]) {  
143 - UIView *view = (UIView *)object; 142 + if ([object isKindOfClass:[MAS_VIEW class]]) {
  143 + MAS_VIEW *view = (MAS_VIEW *)object;
144 if (previousView) { 144 if (previousView) {
145 commonSuperview = [view mas_closestCommonSuperview:commonSuperview]; 145 commonSuperview = [view mas_closestCommonSuperview:commonSuperview];
146 } else { 146 } else {