浏览代码

replace uiview with mas_view

bibibi 10 年之前
父节点
当前提交
a7a78fa984
共有 1 个文件被更改,包括 15 次插入15 次删除
  1. 15 15
      Masonry/NSArray+MASAdditions.m

+ 15 - 15
Masonry/NSArray+MASAdditions.m

@@ -43,11 +43,11 @@
         return;
     }
     
-    UIView *tempSuperView = [self mas_commonSuperviewOfViews];
+    MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
     if (axisType == AxisTypeHorizon) {
-        UIView *prev;
+        MAS_VIEW *prev;
         for (int i = 0; i < self.count; i++) {
-            UIView *v = [self objectAtIndex:i];
+            MAS_VIEW *v = [self objectAtIndex:i];
             [v mas_makeConstraints:^(MASConstraintMaker *make) {
                 if (prev) {
                     make.left.equalTo(prev.mas_right).offset(paddingSpace);
@@ -64,9 +64,9 @@
         }
     }
     else {
-        UIView *prev;
+        MAS_VIEW *prev;
         for (int i = 0; i < self.count; i++) {
-            UIView *v = [self objectAtIndex:i];
+            MAS_VIEW *v = [self objectAtIndex:i];
             [v mas_makeConstraints:^(MASConstraintMaker *make) {
                 if (prev) {
                     make.top.equalTo(prev.mas_bottom).offset(paddingSpace);
@@ -89,11 +89,11 @@
         return;
     }
     
-    UIView *tempSuperView = [self mas_commonSuperviewOfViews];
+    MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
     if (axisType == AxisTypeHorizon) {
-        UIView *prev;
+        MAS_VIEW *prev;
         for (int i = 0; i < self.count; i++) {
-            UIView *v = [self objectAtIndex:i];
+            MAS_VIEW *v = [self objectAtIndex:i];
             [v mas_makeConstraints:^(MASConstraintMaker *make) {
                 if (prev) {
                     CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength;
@@ -112,9 +112,9 @@
         }
     }
     else {
-        UIView *prev;
+        MAS_VIEW *prev;
         for (int i = 0; i < self.count; i++) {
-            UIView *v = [self objectAtIndex:i];
+            MAS_VIEW *v = [self objectAtIndex:i];
             [v mas_makeConstraints:^(MASConstraintMaker *make) {
                 if (prev) {
                     CGFloat offset = (1-(i/((CGFloat)self.count-1)))*itemLength;
@@ -134,13 +134,13 @@
     }
 }
 
-- (UIView *)mas_commonSuperviewOfViews
+- (MAS_VIEW *)mas_commonSuperviewOfViews
 {
-    UIView *commonSuperview = nil;
-    UIView *previousView = nil;
+    MAS_VIEW *commonSuperview = nil;
+    MAS_VIEW *previousView = nil;
     for (id object in self) {
-        if ([object isKindOfClass:[UIView class]]) {
-            UIView *view = (UIView *)object;
+        if ([object isKindOfClass:[MAS_VIEW class]]) {
+            MAS_VIEW *view = (MAS_VIEW *)object;
             if (previousView) {
                 commonSuperview = [view mas_closestCommonSuperview:commonSuperview];
             } else {