-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.31 KB
(100%)
...xcodeproj/project.xcworkspace/xcuserdata/semin.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
LeeSeminSU/LeeSeminSU/Week2/SpacerPadding/SpacerPaddingExample.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// SpacerPaddingExample.swift | ||
// LeeSeminSU | ||
// | ||
// Created by 이세민 on 11/10/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct SpacerPaddingExample: View { | ||
var body: some View { | ||
VStack{ | ||
Text("Spacer") | ||
.font(.title3) | ||
.padding() | ||
|
||
HStack { | ||
Text("왼쪽") | ||
.padding() | ||
.border(.yellow) | ||
Spacer() // Spacer가 왼쪽 뷰와 오른쪽 뷰 사이에 남는 공간을 채움 | ||
Text("오른쪽") | ||
.padding() | ||
.border(.yellow) | ||
} | ||
.padding() | ||
.border(.yellow) | ||
} | ||
.padding(.bottom, 100) | ||
|
||
Text("Padding") | ||
.font(.title3) | ||
.padding() // 기본 패딩은 모든 방향에 동일한 여백을 추가 | ||
.border(.blue) | ||
} | ||
} |