Browse Source

我的(设置UI)微调

hxb 8 years ago
parent
commit
a5410640a4

+ 0 - 8
WSCloudStorage.xcodeproj/project.pbxproj

@@ -547,18 +547,10 @@
 		AC3B38181F34105F00696B12 /* TabBarTransList */ = {
 			isa = PBXGroup;
 			children = (
-				AC3B38191F34105F00696B12 /* 未命名文件夹 */,
 			);
 			path = TabBarTransList;
 			sourceTree = "<group>";
 		};
-		AC3B38191F34105F00696B12 /* 未命名文件夹 */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = "未命名文件夹";
-			sourceTree = "<group>";
-		};
 		AC3B394C1F34110300696B12 /* Login */ = {
 			isa = PBXGroup;
 			children = (

BIN
WSCloudStorage.xcworkspace/xcuserdata/jonathanh.xcuserdatad/UserInterfaceState.xcuserstate


+ 16 - 0
WSCloudStorage.xcworkspace/xcuserdata/jonathanh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -99,5 +99,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "WSCloudStorage/VC/TabBarMore/PreferencesViewController.m"
+            timestampString = "523730480.265236"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "50"
+            endingLineNumber = "50"
+            landmarkName = "-initSubViews"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 23 - 9
WSCloudStorage/VC/TabBarMore/PreferencesViewController.m

@@ -7,8 +7,8 @@
 //
 
 #import "PreferencesViewController.h"
-#define AvatarWH 80
-#define ProgressH 4
+#define AvatarWH 60
+#define ProgressH 8
 #define MaxX(view) CGRectGetMaxX(view.frame)
 #define EqualY(view) view.frame.origin.y
 //#define MaxXPlus(MaxX(v),plusnumber) (MaxX(v) + plusnumber)
@@ -17,13 +17,14 @@
 @interface PreferencesViewController()<UITableViewDelegate,UITableViewDataSource>
 @property(nonatomic,weak)UIImageView *avatarview;
 @property(nonatomic,weak)UIProgressView *progressview;
+@property(nonatomic,weak)UIView *gridView;//九宫格view,待自定义
 @property(nonatomic,weak)UITableView *tableview;
 @end
 @implementation PreferencesViewController
 -(void)viewDidLoad{
     [super viewDidLoad];
-    
-    
+    self.navigationController.navigationBar.hidden = YES;
+    [self initSubViews];
 }
 -(void)initSubViews{
     //|----|namelabel
@@ -35,7 +36,7 @@
     UIImageView *avatarview = [[UIImageView alloc]init];
     avatarview.layer.cornerRadius = AvatarWH/2;
     avatarview.layer.masksToBounds = YES;
-    avatarview.frame = CGRectMake(ScreenMarginTBLR, ScreenMarginTBLR, AvatarWH, AvatarWH);
+    avatarview.frame = CGRectMake(ScreenMarginTBLR, 2*ScreenMarginTBLR, AvatarWH, AvatarWH);
     avatarview.backgroundColor = [UIColor grayColor];
     [self.view addSubview:avatarview];
     self.avatarview = avatarview;
@@ -43,13 +44,14 @@
     residualRightW = screenW - MaxX(avatarview) - 10 - 20;//10 为何下一个控件的x距离 20为右边距
     
     UILabel *namelab = [[UILabel alloc]init];
+    namelab.backgroundColor = [UIColor grayColor];
     namelab.textColor = [UIColor blackColor];
-    namelab.font = [UIFont boldSystemFontOfSize:18];
-    namelab.text = [userDefaults objectForKey:@"displayName"];
-    namelab.frame = CGRectMake(MaxX(avatarview)+ 10, ScreenMarginTBLR, 200, 30);//临时写死
+    namelab.font = [UIFont systemFontOfSize:16];
+    namelab.text = [userDefaults objectForKey:@"displayName"]==nil?@"显示名称":[userDefaults objectForKey:@"displayName"];
+    namelab.frame = CGRectMake(MaxX(avatarview)+ 10, avatarview.frame.origin.y, 200, 30);//临时写死
     [self.view addSubview:namelab];
     
-    UIProgressView *progressview = [[UIProgressView alloc]initWithFrame:CGRectMake(screenW-residualRightW,avatarview.centerY -2 , residualRightW, ProgressH)];
+    UIProgressView *progressview = [[UIProgressView alloc]initWithFrame:CGRectMake(namelab.origin.x,avatarview.centerY -ProgressH/2 , residualRightW, ProgressH)];
     progressview.progressTintColor = UIColorFromRGB(0x0DA32E);
     progressview.backgroundColor = [UIColor lightGrayColor];
     [self.view addSubview:progressview];
@@ -57,7 +59,19 @@
     
     UILabel *descritionlab = [[UILabel alloc]init];
     descritionlab.text = @"容量 (23.12G/35.00G 66%)";
+    descritionlab.font = [UIFont systemFontOfSize:12];
+    descritionlab.backgroundColor = [UIColor grayColor];
+    descritionlab.frame = CGRectMake(progressview.origin.x, CGRectGetMaxY(progressview.frame), residualRightW, 30);
     [self.view addSubview:descritionlab];
+    UIView *gridView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(avatarview.frame)+20, screenW, 200)];
+    gridView.backgroundColor = [UIColor blueColor];
+    [self.view addSubview:gridView];
+    self.gridView = gridView;
+    
+    UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(gridView.frame), screenW, 300) style:UITableViewStylePlain];
+    tableView.separatorColor = [UIColor clearColor];
+    [self.view addSubview:tableView];
+    self.tableview = tableView;
 }
 
 @end