Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
555 changes: 555 additions & 0 deletions week01/mission/Megabox_week1/Megabox.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Megabox.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "apple.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "kakao.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "megabox_logo.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "naver.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "umc_image.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions week01/mission/Megabox_week1/Megabox/LoginView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import SwiftUI


struct LoginView: View {

var body: some View {
VStack{
//Part1 - 로그인 글씨
Text("로그인").font(.PretendardSemiBold24).foregroundColor(.black)
Spacer(minLength: 44)

//Part2 - 로그인 영역
VStack{
VStack(spacing: 40){ //Part2.1 - id,pw
//id
VStack(alignment: .leading, spacing: 6) {
Text("아이디").font(.PretendardMedium16).foregroundColor(.gray03)
Rectangle().frame(height: 1).foregroundColor(.gray02)
}

//pw
VStack(alignment: .leading, spacing: 6) {
Text("비밀번호").font(.PretendardMedium16).foregroundColor(.gray03)
Rectangle().frame(height: 1).foregroundColor(.gray02)
}
}
Spacer(minLength: 75)

VStack{ //2.2 - Login Button & 회원가입
Button(action: {}) {
Text("로그인").font(.PretendardBold18).foregroundColor(.white)
.frame(maxWidth: .infinity, minHeight: 54)
.background(RoundedRectangle(cornerRadius: 12).fill(Color.purple04))
}
.shadow(color: .black.opacity(0.25),radius: 12, x: 0, y: 8)
// 회원가입
Text("회원가입").font(.PretendardMedium13).foregroundColor(.gray04)
}
Spacer(minLength: 17)

HStack{ //2.3 아이콘 3개 넣기
Spacer().frame(width: 71) // 왼쪽 여백

Image("naver")
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)

Spacer() // 네이버 ↔ 카카오 자동 간격

Image("kakao")
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)

Spacer() // 카카오 ↔ 애플 자동 간격

Image("apple")
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)

Spacer().frame(width: 71) // 오른쪽 여백

}
.frame(maxWidth: .infinity) // 부모 기준으로 꽉 차게

}
.frame(height: 323) // ← 여기서 전체 VStack 높이를 323pt로 고정
Spacer(minLength: 17)

// Part3 - 하단 사진 (이게 과제 요구사항)
Image("umc_image").resizable().scaledToFill().frame(width: 408, height: 266)

//수정한 버전 이게 더 이쁘게 나옴
/*Image("umc_image")
.resizable()
.scaledToFit() // 비율 유지하면서 가로에 맞춤
.frame(maxWidth: .infinity) // 부모 너비 기준으로 채움
.frame(height: 266) // 높이 고정
.padding(.horizontal, 16) // ← 여기서 여백 적용
*/


}

.padding(.horizontal, 16) // ← 여기서 좌우 16pt 여백 적용
}
}

#Preview {
LoginView()
}
17 changes: 17 additions & 0 deletions week01/mission/Megabox_week1/Megabox/MegaboxApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// MegaboxApp.swift
// Megabox
//
// Created by 최우진 on 9/20/25.
//

import SwiftUI

@main
struct MegaboxApp: App {
var body: some Scene {
WindowGroup {
LoginView()
}
}
}
15 changes: 15 additions & 0 deletions week01/mission/Megabox_week1/Megabox/SplashView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import SwiftUI

struct SplashView: View {
var body: some View {
VStack{
Spacer()
Image("megabox_logo").resizable().scaledToFit().frame(width: 249, height: 84)
Spacer()
}
}
}

#Preview {
SplashView()
}
62 changes: 62 additions & 0 deletions week01/mission/Megabox_week1/Megabox/color.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//
// color.swift
// Megabox
//
// Created by 최우진 on 9/20/25.
//

import Foundation
import SwiftUI

extension Color {
// 1) 이니셜라이저를 Color.swift로 옮기고, 팔레트보다 위에 둡니다.
init(hex: UInt, alpha: Double = 1.0) {
self.init(.sRGB,
red: Double((hex >> 16) & 0xFF) / 255.0,
green: Double((hex >> 8) & 0xFF) / 255.0,
blue: Double( hex & 0xFF) / 255.0,
opacity: alpha)
}

// 2) 팔레트 정의
// Blue
static let blue00 = Color(hex: 0xE5EAFA as UInt)
static let blue01 = Color(hex: 0xFFFFFF as UInt)
static let blue02 = Color(hex: 0xE3E9F5 as UInt)
static let blue03 = Color(hex: 0x8AAAD6 as UInt)
static let blue04 = Color(hex: 0x6C94C3 as UInt)
static let blue05 = Color(hex: 0x5C85B9 as UInt)
static let blue06 = Color(hex: 0x466F9E as UInt)
static let blue07 = Color(hex: 0x2F567F as UInt)
static let blue08 = Color(hex: 0x1E3C60 as UInt)
static let blue09 = Color(hex: 0x132847 as UInt)

// Purple
static let purple00 = Color(hex: 0xF5E8FF as UInt)
static let purple01 = Color(hex: 0xE4C8FF as UInt)
static let purple02 = Color(hex: 0xC49CFF as UInt)
static let purple03 = Color(hex: 0x9C6EFF as UInt)
static let purple04 = Color(hex: 0x6F2CFF as UInt) // 버튼 색
static let purple05 = Color(hex: 0x5C23CC as UInt)
static let purple06 = Color(hex: 0x491A99 as UInt)
static let purple07 = Color(hex: 0x371266 as UInt)
static let purple08 = Color(hex: 0x240933 as UInt)
static let purple09 = Color(hex: 0x1A0020 as UInt)

// Grey
static let gray00 = Color(hex: 0xF8F9FA as UInt)
static let gray01 = Color(hex: 0xF1F3F5 as UInt)
static let gray02 = Color(hex: 0xE5E5EA as UInt)
static let gray03 = Color(hex: 0xD1D5DB as UInt)
static let gray04 = Color(hex: 0x9CA3AF as UInt)
static let gray05 = Color(hex: 0x6B7280 as UInt)
static let gray06 = Color(hex: 0x4B5563 as UInt)
static let gray07 = Color(hex: 0x374151 as UInt)
static let gray08 = Color(hex: 0x1F2937 as UInt)
static let gray09 = Color(hex: 0x111827 as UInt)

// White / Black (토큰)
static let White = Color.white
static let Black = Color.black
}

Loading