-
Notifications
You must be signed in to change notification settings - Fork 3
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
Hyun Lee
committed
Jun 15, 2024
1 parent
7c4d4ca
commit 168956f
Showing
11 changed files
with
232 additions
and
39 deletions.
There are no files selected for viewing
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
Binary file modified
BIN
+17.4 KB
(130%)
...odeproj/project.xcworkspace/xcuserdata/hyunlee.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
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
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
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,29 @@ | ||
// | ||
// RouterModel.swift | ||
// Code Drop_Team 11 | ||
// | ||
// Created by Hyun Lee on 6/15/24. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
class Router: ObservableObject{ | ||
@Published var path: NavigationPath = NavigationPath() | ||
|
||
func push(_ routePathView: Destination){ | ||
path.append(routePathView) | ||
} | ||
|
||
func backToRoot(){ | ||
self.path = NavigationPath() | ||
} | ||
} | ||
|
||
enum Destination{ | ||
case homeView | ||
case listView | ||
case detailView | ||
case endView | ||
} | ||
|
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
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,51 @@ | ||
// | ||
// EndView.swift | ||
// Code Drop_Team 11 | ||
// | ||
// Created by Hyun Lee on 6/15/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct EndView: View { | ||
var body: some View { | ||
|
||
@EnvironmentObject var router: Router | ||
@EnvironmentObject var notificationManager: NotificationManager | ||
|
||
var random = AllQuotes.randomElement() | ||
VStack{ | ||
Spacer() | ||
ZStack{ | ||
RoundedRectangle(cornerRadius: 32) | ||
.frame(width:393, height: 224) | ||
.foregroundColor(.gray) | ||
VStack { | ||
Text("Text(\"\(random?.title ?? "")\")") | ||
Text("\(random?.text ?? "")") | ||
// Spacer() | ||
Text("- \(random?.name ?? "")") | ||
} | ||
} | ||
Spacer() | ||
Button{ | ||
// notificationManager. | ||
router.push(.homeView) | ||
// router.backToRoot() | ||
}label:{ | ||
ZStack{ | ||
RoundedRectangle(cornerRadius: 16) | ||
.foregroundColor(.green) | ||
.frame(width: 354, height:54) | ||
Text("홈으로") | ||
.foregroundStyle(Color(.white)) | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
#Preview { | ||
EndView() | ||
} |
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
Oops, something went wrong.