Skip to content

Commit

Permalink
Feat/#11
Browse files Browse the repository at this point in the history
모달 뷰 완성
  • Loading branch information
EvelynMacbookPro committed Aug 19, 2024
1 parent 40758e6 commit 210a5fb
Show file tree
Hide file tree
Showing 13 changed files with 362 additions and 82 deletions.
8 changes: 6 additions & 2 deletions MC2Maps.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
A88329EE2C6DEBCC00D6CC87 /* MapLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88329ED2C6DEBCC00D6CC87 /* MapLocation.swift */; };
A88329F22C71EA6100D6CC87 /* ModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88329F12C71EA6100D6CC87 /* ModalView.swift */; };
A88CEC682C73164200B4B1EF /* Timetest.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88CEC672C73164200B4B1EF /* Timetest.swift */; };
EAF2746D2C1C6B2C00D90AEA /* MC2MapsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF2746C2C1C6B2C00D90AEA /* MC2MapsApp.swift */; };
EAF2746F2C1C6B2C00D90AEA /* MapsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF2746E2C1C6B2C00D90AEA /* MapsView.swift */; };
EAF274712C1C6B2E00D90AEA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAF274702C1C6B2E00D90AEA /* Assets.xcassets */; };
Expand All @@ -18,6 +19,7 @@
/* Begin PBXFileReference section */
A88329ED2C6DEBCC00D6CC87 /* MapLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapLocation.swift; sourceTree = "<group>"; };
A88329F12C71EA6100D6CC87 /* ModalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalView.swift; sourceTree = "<group>"; };
A88CEC672C73164200B4B1EF /* Timetest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Timetest.swift; sourceTree = "<group>"; };
EAF274692C1C6B2C00D90AEA /* MC2Maps.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MC2Maps.app; sourceTree = BUILT_PRODUCTS_DIR; };
EAF2746C2C1C6B2C00D90AEA /* MC2MapsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MC2MapsApp.swift; sourceTree = "<group>"; };
EAF2746E2C1C6B2C00D90AEA /* MapsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapsView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -61,6 +63,7 @@
EAF2746E2C1C6B2C00D90AEA /* MapsView.swift */,
A88329F12C71EA6100D6CC87 /* ModalView.swift */,
A88329ED2C6DEBCC00D6CC87 /* MapLocation.swift */,
A88CEC672C73164200B4B1EF /* Timetest.swift */,
EAF274702C1C6B2E00D90AEA /* Assets.xcassets */,
EAF274722C1C6B2E00D90AEA /* Preview Content */,
);
Expand Down Expand Up @@ -147,6 +150,7 @@
files = (
EAF2746F2C1C6B2C00D90AEA /* MapsView.swift in Sources */,
EAF2746D2C1C6B2C00D90AEA /* MC2MapsApp.swift in Sources */,
A88CEC682C73164200B4B1EF /* Timetest.swift in Sources */,
A88329F22C71EA6100D6CC87 /* ModalView.swift in Sources */,
A88329EE2C6DEBCC00D6CC87 /* MapLocation.swift in Sources */,
);
Expand Down Expand Up @@ -282,7 +286,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MC2Maps/Preview Content\"";
DEVELOPMENT_TEAM = RQW4ABCWWT;
DEVELOPMENT_TEAM = J75PB3W4SD;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MC2Maps/Info.plist;
Expand Down Expand Up @@ -314,7 +318,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MC2Maps/Preview Content\"";
DEVELOPMENT_TEAM = RQW4ABCWWT;
DEVELOPMENT_TEAM = J75PB3W4SD;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MC2Maps/Info.plist;
Expand Down
Binary file not shown.
Binary file added MC2Maps/Assets.xcassets/.DS_Store
Binary file not shown.
Binary file modified MC2Maps/Assets.xcassets/네잎.imageset/네잎.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions MC2Maps/Assets.xcassets/네잎원.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "네잎원.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.
Binary file modified MC2Maps/Assets.xcassets/세잎.imageset/세잎.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions MC2Maps/Assets.xcassets/세잎원.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "세잎원.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.
1 change: 1 addition & 0 deletions MC2Maps/MapLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ final class GeoServiceManager: NSObject, CLLocationManagerDelegate {
let fullAddress = "\(country)\n\(administrativeArea)\n\(locality)\n\(subLocality)\n\(subThoroughfare)"



DispatchQueue.main.async {
completion(fullAddress) // 주소 문자열을 반환
}
Expand Down
36 changes: 20 additions & 16 deletions MC2Maps/MapsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,31 @@ struct MapsView: View {
checkMidnight()
}
//MARK: 올라오는 모달 : 네잎클로바 선택시
.sheet(item: $selectedSpecialAnnotation) { annotation in
VStack {
HStack{
Text("네잎클로버")
.font(.title)
Image("네잎")
.resizable()
.frame(width: 30,height: 30)
}
// 클로버 수 표시
Text("세잎 클로버: \(cloverCounts.threeLeaf)")
Text("네잎 클로버: \(cloverCounts.fourLeaf)")
.sheet(item: $selectedSpecialAnnotation)
{ annotation in
ScrollView{
VStack {
HStack {
Spacer()

Button("Close") {
selectedSpecialAnnotation = nil
}
.presentationDetents([.fraction(0.1), .medium, .large])
.presentationDragIndicator(.visible)
.presentationBackgroundInteraction(.enabled)
.interactiveDismissDisabled()
}
.padding(.trailing, 18)
//클로버 수 표시
Text("세잎 클로버: \(cloverCounts.threeLeaf)")
Text("네잎 클로버: \(cloverCounts.fourLeaf)")
.presentationDetents([.fraction(0.1), .medium, .large])
.presentationDragIndicator(.visible)
.presentationBackgroundInteraction(.enabled)
.interactiveDismissDisabled()

}
Spacer()
}
}

}

//MARK: 어노테이션을 추가하는 함수
Expand Down
Loading

0 comments on commit 210a5fb

Please sign in to comment.