Bläddra i källkod

1.设置页面UI 调整

huangxiaodong 1 år sedan
förälder
incheckning
69dbf862b5

+ 36 - 16
创维盒子/双子星云手机/Class/Set/view/mySetHeadView.m

@@ -82,14 +82,19 @@
         UIButton *curButton = [UIButton buttonWithType:UIButtonTypeCustom];
         curButton.tag = 100 + i;
         
-        [curButton setImage:[UIImage imageNamed:fileImageArr[i]] forState:UIControlStateNormal];
-        [curButton setTitle:fileTitleArr[i] forState:UIControlStateNormal];
-        [curButton setTitleColor:[UIColor hwColor:@"#0A132B" alpha:1.0] forState:UIControlStateNormal];
-        curButton.titleLabel.font = [UIFont systemFontOfSize:12.0];
+//        [curButton setImage:[UIImage imageNamed:fileImageArr[i]] forState:UIControlStateNormal];
+//        [curButton setTitle:fileTitleArr[i] forState:UIControlStateNormal];
+//        [curButton setTitleColor:[UIColor hwColor:@"#0A132B" alpha:1.0] forState:UIControlStateNormal];
+//        curButton.titleLabel.font = [UIFont systemFontOfSize:12.0];
         
         [curButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
         [fileUploadBgView addSubview:curButton];
-        //curButton.backgroundColor = [UIColor redColor];
+        
+//        if(i==0)
+//        {
+//            curButton.backgroundColor = [UIColor greenColor];
+//            curButton.titleLabel.backgroundColor = [UIColor redColor];
+//        }
 
         [curButton mas_makeConstraints:^(MASConstraintMaker *make) {
             make.left.mas_equalTo(butWidth*(i%5));
@@ -98,17 +103,35 @@
             make.height.mas_equalTo(butHeight);
         }];
         
-        CGFloat titleOffset = 10.0;
-        
-        [curButton setTitleEdgeInsets:UIEdgeInsetsMake(curButton.imageView.frame.size.height+5,-curButton.imageView.frame.size.width, 0.0,0.0)];
-        [curButton setImageEdgeInsets:UIEdgeInsetsMake(-curButton.bounds.size.width/4+5, curButton.bounds.size.width/4-titleOffset, curButton.titleLabel.bounds.size.height, -curButton.bounds.size.width/4)];
-        
-//
-//        curImageV.backgroundColor = [UIColor orangeColor];
         
+        UIButton *curImageV = [[UIButton alloc] init];
+        curImageV.userInteractionEnabled = NO;
+        [curImageV setImage:[UIImage imageNamed:fileImageArr[i]] forState:UIControlStateNormal];;
+        [curButton addSubview:curImageV];
+
+        [curImageV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.equalTo(curButton.mas_centerX).offset(0);
+            make.top.mas_equalTo(15);
+            make.width.mas_equalTo(30);
+            make.height.mas_equalTo(30);
+        }];
         
+        UILabel *curlab = [[UILabel alloc] init];
+        curlab.text = fileTitleArr[i];
+        curlab.font = [UIFont systemFontOfSize:12.0];
+        curlab.textColor = [UIColor hwColor:@"#0A132B" alpha:1.0];
+        curlab.numberOfLines = 0;
+        curlab.textAlignment = NSTextAlignmentCenter;
+        [curButton addSubview:curlab];
+
+        [curlab mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(5);//* (i%5)
+            make.right.mas_equalTo(-5);
+            make.height.mas_equalTo(20);
+            make.top.mas_equalTo(curImageV.mas_bottom).offset(5);
+        }];
+    
     }
-   
     
     //其他功能
     UIView *otherBgView = [[UIView alloc] init];
@@ -179,9 +202,6 @@
         [curButton setTitleEdgeInsets:UIEdgeInsetsMake(curButton.imageView.frame.size.height+5,-curButton.imageView.frame.size.width, 0.0,0.0)];
         [curButton setImageEdgeInsets:UIEdgeInsetsMake(-curButton.bounds.size.width/4+5, curButton.bounds.size.width/4-titleOffset, curButton.titleLabel.bounds.size.height, -curButton.bounds.size.width/4)];
         
-//
-//        curImageV.backgroundColor = [UIColor orangeColor];
-        
         
     }
 }

+ 2 - 2
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -453,6 +453,6 @@
 "app_update_wait"   = "稍后再说";
 
 //1.4.0
-"my_set_no_music"   = "音";
+"my_set_no_music"   = "音";
 "my_set_no_file"   = "文件";
-"my_set_no_share"   = "分享";
+"my_set_no_share"   = "分享记录";