Skip to content

Commit 09aa9c8

Browse files
author
liuhao
committed
optimize step view tab item ui
1 parent 8cf208e commit 09aa9c8

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

StepsAppDemo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@
407407
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
408408
CODE_SIGN_ENTITLEMENTS = StepsAppDemo/StepsAppDemo.entitlements;
409409
CODE_SIGN_STYLE = Automatic;
410-
CURRENT_PROJECT_VERSION = 1;
410+
CURRENT_PROJECT_VERSION = 2;
411411
DEVELOPMENT_ASSET_PATHS = "\"StepsAppDemo/Preview Content\"";
412412
DEVELOPMENT_TEAM = TPZ6C9434K;
413413
ENABLE_PREVIEWS = YES;
@@ -440,7 +440,7 @@
440440
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
441441
CODE_SIGN_ENTITLEMENTS = StepsAppDemo/StepsAppDemo.entitlements;
442442
CODE_SIGN_STYLE = Automatic;
443-
CURRENT_PROJECT_VERSION = 1;
443+
CURRENT_PROJECT_VERSION = 2;
444444
DEVELOPMENT_ASSET_PATHS = "\"StepsAppDemo/Preview Content\"";
445445
DEVELOPMENT_TEAM = TPZ6C9434K;
446446
ENABLE_PREVIEWS = YES;

StepsAppDemo.xcodeproj/xcuserdata/iliuh.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>StepsAppDemo.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
10-
<integer>1</integer>
10+
<integer>0</integer>
1111
</dict>
1212
</dict>
1313
</dict>

StepsAppDemo/StepTab/StepsView.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ struct StepsView: View {
3232
tabSwitch = i
3333
}
3434
} label: {
35-
Text(timeArray[i])
35+
VStack {
36+
Text(timeArray[i])
37+
if tabSwitch == i {
38+
Spacer().frame(height: 5)
39+
Rectangle.init().foregroundColor(.mainColor).frame(width: 20, height: 2.0)
40+
}
41+
}
3642
}
3743
.foregroundColor(tabSwitch == i ? .black: .dateGray)
38-
.padding(5)
39-
.font(Font.system(size: 18, weight: tabSwitch == i ? .bold : .regular))
44+
.padding(15)
45+
.font(Font.system(size: 16, weight: tabSwitch == i ? .bold : .regular))
4046
}
4147
Spacer()
4248

0 commit comments

Comments
 (0)