diff --git a/Damso.xcodeproj/project.pbxproj b/Damso.xcodeproj/project.pbxproj index 4e27106..c8057dc 100644 --- a/Damso.xcodeproj/project.pbxproj +++ b/Damso.xcodeproj/project.pbxproj @@ -24,12 +24,14 @@ 0214CCDF29926D6400EC5CAE /* afterLoginVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0214CCD229926D6400EC5CAE /* afterLoginVC.swift */; }; 0214CCE029926D6400EC5CAE /* editView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0214CCD329926D6400EC5CAE /* editView.swift */; }; 0214CCE129926D6400EC5CAE /* secondInfoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0214CCD429926D6400EC5CAE /* secondInfoTableViewCell.swift */; }; - 02277CAD29965DF4002E164E /* Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02277CAC29965DF4002E164E /* Keys.swift */; }; - 02277CAF299668FB002E164E /* NotoSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 02277CAE299668FB002E164E /* NotoSans-SemiBold.ttf */; }; 7C7EA1298971C6508DBBC2CE /* Pods_Damso.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC41CC4BF6B184B7B5B646D5 /* Pods_Damso.framework */; }; DE0139EF2995604A00EC9A5A /* ReportInputModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139EE2995604A00EC9A5A /* ReportInputModel.swift */; }; DE0139F12995671C00EC9A5A /* ReportInputManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139F02995671C00EC9A5A /* ReportInputManager.swift */; }; DE0139F329957B8D00EC9A5A /* ReportInputResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139F229957B8D00EC9A5A /* ReportInputResult.swift */; }; + DE0139F62997908100EC9A5A /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139F52997908100EC9A5A /* SearchView.swift */; }; + DE0139F82997909700EC9A5A /* SearchVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139F72997909700EC9A5A /* SearchVC.swift */; }; + DE0139FC299817AF00EC9A5A /* SearchTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139FB299817AF00EC9A5A /* SearchTypeView.swift */; }; + DE0139FE2998E66C00EC9A5A /* SearchTypeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0139FD2998E66C00EC9A5A /* SearchTypeVC.swift */; }; DE123C2A296C39AC00B7149B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE123C29296C39AC00B7149B /* AppDelegate.swift */; }; DE123C2C296C39AC00B7149B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE123C2B296C39AC00B7149B /* SceneDelegate.swift */; }; DE123C33296C39AE00B7149B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DE123C32296C39AE00B7149B /* Assets.xcassets */; }; @@ -61,7 +63,7 @@ DEA95B3A2983F20400AE8D0C /* ReportInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B392983F20400AE8D0C /* ReportInputView.swift */; }; DEA95B3D2988410D00AE8D0C /* BookmarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B3C2988410D00AE8D0C /* BookmarkView.swift */; }; DEA95B3F2988412900AE8D0C /* BookmarkVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B3E2988412900AE8D0C /* BookmarkVC.swift */; }; - DEA95B4129884B9600AE8D0C /* BookmarkTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B4029884B9600AE8D0C /* BookmarkTableViewCell.swift */; }; + DEA95B4129884B9600AE8D0C /* SmokingAreaTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B4029884B9600AE8D0C /* SmokingAreaTableViewCell.swift */; }; DEA95B43298854E900AE8D0C /* BookmarkIsEmptyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA95B42298854E900AE8D0C /* BookmarkIsEmptyCell.swift */; }; EC46E73B29892CCE00F767C4 /* ReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E73129892CCD00F767C4 /* ReportViewController.swift */; }; EC46E73C29892CCE00F767C4 /* ReportPushViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E73229892CCE00F767C4 /* ReportPushViewController.swift */; }; @@ -73,7 +75,6 @@ EC46E74429892CCE00F767C4 /* BottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E73A29892CCE00F767C4 /* BottomSheetViewController.swift */; }; EC46E74C2995600100F767C4 /* Markers.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E74B2995600100F767C4 /* Markers.swift */; }; EC46E74E299565DD00F767C4 /* MarkersHTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E74D299565DD00F767C4 /* MarkersHTTPMethod.swift */; }; - EC46E7502995A4B100F767C4 /* Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E74F2995A4B100F767C4 /* Keys.swift */; }; EC46E7522995C23F00F767C4 /* DetailSimpleHTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46E7512995C23F00F767C4 /* DetailSimpleHTTPMethod.swift */; }; /* End PBXBuildFile section */ @@ -95,13 +96,15 @@ 0214CCD229926D6400EC5CAE /* afterLoginVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = afterLoginVC.swift; sourceTree = ""; }; 0214CCD329926D6400EC5CAE /* editView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = editView.swift; sourceTree = ""; }; 0214CCD429926D6400EC5CAE /* secondInfoTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = secondInfoTableViewCell.swift; sourceTree = ""; }; - 02277CAC29965DF4002E164E /* Keys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Keys.swift; path = ../../../../../Downloads/Keys.swift; sourceTree = ""; }; - 02277CAE299668FB002E164E /* NotoSans-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "NotoSans-SemiBold.ttf"; path = "../../../../../../Downloads/Noto_Sans/NotoSans-SemiBold.ttf"; sourceTree = ""; }; 5255AD62BEE5A9637A7D0115 /* Pods-Damso.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Damso.release.xcconfig"; path = "Target Support Files/Pods-Damso/Pods-Damso.release.xcconfig"; sourceTree = ""; }; DB7F394FDC0E35B9274B56E2 /* Pods-Damso.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Damso.debug.xcconfig"; path = "Target Support Files/Pods-Damso/Pods-Damso.debug.xcconfig"; sourceTree = ""; }; DE0139EE2995604A00EC9A5A /* ReportInputModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportInputModel.swift; sourceTree = ""; }; DE0139F02995671C00EC9A5A /* ReportInputManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportInputManager.swift; sourceTree = ""; }; DE0139F229957B8D00EC9A5A /* ReportInputResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportInputResult.swift; sourceTree = ""; }; + DE0139F52997908100EC9A5A /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; + DE0139F72997909700EC9A5A /* SearchVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchVC.swift; sourceTree = ""; }; + DE0139FB299817AF00EC9A5A /* SearchTypeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTypeView.swift; sourceTree = ""; }; + DE0139FD2998E66C00EC9A5A /* SearchTypeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTypeVC.swift; sourceTree = ""; }; DE123C26296C39AC00B7149B /* Damso.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Damso.app; sourceTree = BUILT_PRODUCTS_DIR; }; DE123C29296C39AC00B7149B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; DE123C2B296C39AC00B7149B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -131,7 +134,7 @@ DEA95B392983F20400AE8D0C /* ReportInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportInputView.swift; sourceTree = ""; }; DEA95B3C2988410D00AE8D0C /* BookmarkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkView.swift; sourceTree = ""; }; DEA95B3E2988412900AE8D0C /* BookmarkVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkVC.swift; sourceTree = ""; }; - DEA95B4029884B9600AE8D0C /* BookmarkTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkTableViewCell.swift; sourceTree = ""; }; + DEA95B4029884B9600AE8D0C /* SmokingAreaTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmokingAreaTableViewCell.swift; sourceTree = ""; }; DEA95B42298854E900AE8D0C /* BookmarkIsEmptyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkIsEmptyCell.swift; sourceTree = ""; }; EC46E73129892CCD00F767C4 /* ReportViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReportViewController.swift; sourceTree = ""; }; EC46E73229892CCE00F767C4 /* ReportPushViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReportPushViewController.swift; sourceTree = ""; }; @@ -143,7 +146,6 @@ EC46E73A29892CCE00F767C4 /* BottomSheetViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomSheetViewController.swift; sourceTree = ""; }; EC46E74B2995600100F767C4 /* Markers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Markers.swift; sourceTree = ""; }; EC46E74D299565DD00F767C4 /* MarkersHTTPMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkersHTTPMethod.swift; sourceTree = ""; }; - EC46E74F2995A4B100F767C4 /* Keys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Keys.swift; path = ../../../../Downloads/Keys.swift; sourceTree = ""; }; EC46E7512995C23F00F767C4 /* DetailSimpleHTTPMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailSimpleHTTPMethod.swift; sourceTree = ""; }; FC41CC4BF6B184B7B5B646D5 /* Pods_Damso.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Damso.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -201,6 +203,17 @@ name = Frameworks; sourceTree = ""; }; + DE0139F42997902400EC9A5A /* Search */ = { + isa = PBXGroup; + children = ( + DE0139F52997908100EC9A5A /* SearchView.swift */, + DE0139F72997909700EC9A5A /* SearchVC.swift */, + DE0139FB299817AF00EC9A5A /* SearchTypeView.swift */, + DE0139FD2998E66C00EC9A5A /* SearchTypeVC.swift */, + ); + path = Search; + sourceTree = ""; + }; DE123C1D296C39AC00B7149B = { isa = PBXGroup; children = ( @@ -252,6 +265,7 @@ DE123C48296D6B7A00B7149B /* Presentation */ = { isa = PBXGroup; children = ( + DE0139F42997902400EC9A5A /* Search */, 0214CCBF29926C8100EC5CAE /* MyInfo */, DEA95B3B298840EE00AE8D0C /* Bookmark */, EC46E70029892B4C00F767C4 /* main */, @@ -302,7 +316,6 @@ DE5F0BA029903E9600660E52 /* Network */ = { isa = PBXGroup; children = ( - EC46E74F2995A4B100F767C4 /* Keys.swift */, DE5F0BA62990513F00660E52 /* GeocodingManager.swift */, DE5F0BA82990579D00660E52 /* ReverseGCModel.swift */, DE0139EE2995604A00EC9A5A /* ReportInputModel.swift */, @@ -342,7 +355,6 @@ 0214CCC329926D3800EC5CAE /* NotoSansDisplay-Bold.ttf */, 0214CCC029926D3700EC5CAE /* NotoSansDisplay-ExtraCondensed.ttf */, 0214CCC229926D3800EC5CAE /* RobotoCondensed-Regular.ttf */, - 02277CAE299668FB002E164E /* NotoSans-SemiBold.ttf */, DEA95B212978694600AE8D0C /* NotoSansKR-Bold.otf */, DEA95B222978694700AE8D0C /* NotoSansKR-Light.otf */, DEA95B1F2978694600AE8D0C /* NotoSansKR-Medium.otf */, @@ -376,7 +388,7 @@ children = ( DEA95B3C2988410D00AE8D0C /* BookmarkView.swift */, DEA95B3E2988412900AE8D0C /* BookmarkVC.swift */, - DEA95B4029884B9600AE8D0C /* BookmarkTableViewCell.swift */, + DEA95B4029884B9600AE8D0C /* SmokingAreaTableViewCell.swift */, DEA95B42298854E900AE8D0C /* BookmarkIsEmptyCell.swift */, ); path = Bookmark; @@ -480,7 +492,6 @@ 0214CCC629926D3800EC5CAE /* RobotoCondensed-Regular.ttf in Resources */, DEA95B262978694700AE8D0C /* NotoSansKR-Regular.otf in Resources */, DE123C33296C39AE00B7149B /* Assets.xcassets in Resources */, - 02277CAF299668FB002E164E /* NotoSans-SemiBold.ttf in Resources */, EC46E74129892CCE00F767C4 /* Main.storyboard in Resources */, DEA95B272978694700AE8D0C /* NotoSansKR-Bold.otf in Resources */, DEA95B2A2978694700AE8D0C /* NotoSansKR-Black.otf in Resources */, @@ -544,6 +555,7 @@ EC46E74E299565DD00F767C4 /* MarkersHTTPMethod.swift in Sources */, DEA95B3A2983F20400AE8D0C /* ReportInputView.swift in Sources */, DEA95B34297EDA5100AE8D0C /* TabBarController.swift in Sources */, + DE0139FC299817AF00EC9A5A /* SearchTypeView.swift in Sources */, DEA95B1B29774EF900AE8D0C /* OnboardingVC.swift in Sources */, EC46E74429892CCE00F767C4 /* BottomSheetViewController.swift in Sources */, 0214CCE029926D6400EC5CAE /* editView.swift in Sources */, @@ -562,19 +574,21 @@ DE123C2C296C39AC00B7149B /* SceneDelegate.swift in Sources */, 0214CCDD29926D6400EC5CAE /* MydataVC.swift in Sources */, DEA95B43298854E900AE8D0C /* BookmarkIsEmptyCell.swift in Sources */, + DE0139F82997909700EC9A5A /* SearchVC.swift in Sources */, DEA95B32297AF65700AE8D0C /* UIButton+Extension.swift in Sources */, DE5F0BA92990579D00660E52 /* ReverseGCModel.swift in Sources */, 0214CCDC29926D6400EC5CAE /* LoginVC.swift in Sources */, EC46E73F29892CCE00F767C4 /* BottomSheetViewController2.swift in Sources */, DEA95B0D2976A38900AE8D0C /* ReportView.swift in Sources */, + DE0139FE2998E66C00EC9A5A /* SearchTypeVC.swift in Sources */, EC46E74229892CCE00F767C4 /* ReviewUploadViewController.swift in Sources */, EC46E7522995C23F00F767C4 /* DetailSimpleHTTPMethod.swift in Sources */, 0214CCE129926D6400EC5CAE /* secondInfoTableViewCell.swift in Sources */, 0214CCD629926D6400EC5CAE /* PopupVC.swift in Sources */, EC46E73D29892CCE00F767C4 /* SearchViewController.swift in Sources */, DE0139F12995671C00EC9A5A /* ReportInputManager.swift in Sources */, - EC46E7502995A4B100F767C4 /* Keys.swift in Sources */, - DEA95B4129884B9600AE8D0C /* BookmarkTableViewCell.swift in Sources */, + DE0139F62997908100EC9A5A /* SearchView.swift in Sources */, + DEA95B4129884B9600AE8D0C /* SmokingAreaTableViewCell.swift in Sources */, DEA95B122976A75B00AE8D0C /* ReportVC.swift in Sources */, DE123C4F296D743C00B7149B /* BaseVC.swift in Sources */, DEA95B1929774ED700AE8D0C /* OnboardingView.swift in Sources */, @@ -723,7 +737,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SN4DKJ8AHY; + DEVELOPMENT_TEAM = AYG8MBJF93; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Damso/Info.plist; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "위치 기반 서비스 제공을 위해 GPS 정보가 필요합니다."; @@ -753,7 +767,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SN4DKJ8AHY; + DEVELOPMENT_TEAM = AYG8MBJF93; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Damso/Info.plist; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "위치 기반 서비스 제공을 위해 GPS 정보가 필요합니다."; diff --git a/Damso/Data/Network/MarkersHTTPMethod.swift b/Damso/Data/Network/MarkersHTTPMethod.swift index 6a0cc68..73b8302 100644 --- a/Damso/Data/Network/MarkersHTTPMethod.swift +++ b/Damso/Data/Network/MarkersHTTPMethod.swift @@ -23,29 +23,9 @@ class MarkersHTTPMethod{ switch response.result { case .success(let value): //print(value) - - let marker = NMFMarker() - var pinInfoArr :Array = [] - - for i in value.result { - //marker.position = NMGLatLng(lat: Double(value.result[15].la)!, lng: Double(value.result[15].lo)!) - - //marker.position = NMGLatLng(lat: Double(i.la)!, lng: Double(i.lo)!) - pinInfoArr.append(Pin(facilityId: i.facilityId, la: i.la, lo: i.lo)) - //print(Double(i.la)!) - //print(markerArr) - - //print(Double(value.result[15].la)!) - //print(Double(value.result[15].lo)!) - - } - completionHandler(pinInfoArr) - - - + completionHandler(value.result) case .failure(let error): print(error.localizedDescription) - } } } diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/Contents.json b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/Contents.json new file mode 100644 index 0000000..bdaf411 --- /dev/null +++ b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ExactlyClosed 1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ExactlyClosed 2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ExactlyClosed 3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 1x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 1x.png new file mode 100644 index 0000000..e5a3d2a Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 1x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 2x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 2x.png new file mode 100644 index 0000000..e990b78 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 2x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 3x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 3x.png new file mode 100644 index 0000000..a6a3422 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyClosedImg.imageset/ExactlyClosed 3x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 1x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 1x.png new file mode 100644 index 0000000..bbadbd9 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 1x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 2x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 2x.png new file mode 100644 index 0000000..8b67d50 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 2x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 3x.png b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 3x.png new file mode 100644 index 0000000..78e4d1e Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/AreaExactlyOpenImg 3x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/Contents.json b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/Contents.json new file mode 100644 index 0000000..3bb2912 --- /dev/null +++ b/Damso/Global/Resources/Assets.xcassets/AreaExactlyOpenImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "AreaExactlyOpenImg 1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "AreaExactlyOpenImg 2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "AreaExactlyOpenImg 3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Contents.json b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Contents.json new file mode 100644 index 0000000..2e3dabe --- /dev/null +++ b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "OpenArea 1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Open 2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Open 3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 2x.png b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 2x.png new file mode 100644 index 0000000..fb15f49 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 2x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 3x.png b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 3x.png new file mode 100644 index 0000000..b0c2a5d Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/Open 3x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/OpenArea 1x.png b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/OpenArea 1x.png new file mode 100644 index 0000000..3a83f26 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaOpenImg.imageset/OpenArea 1x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/Contents.json b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/Contents.json new file mode 100644 index 0000000..5524f63 --- /dev/null +++ b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "close 1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "close 2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "close 3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 1x.png b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 1x.png new file mode 100644 index 0000000..284f490 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 1x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 2x.png b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 2x.png new file mode 100644 index 0000000..9b77b59 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 2x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 3x.png b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 3x.png new file mode 100644 index 0000000..6cf48f4 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/AreaclosedImg.imageset/close 3x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/Contents.json b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/Contents.json new file mode 100644 index 0000000..c9213f1 --- /dev/null +++ b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ExactlyOpenArea 1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ExactlyOpenArea 2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ExactlyOpenArea 3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 1x.png b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 1x.png new file mode 100644 index 0000000..9204fa7 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 1x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 2x.png b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 2x.png new file mode 100644 index 0000000..8ff8d36 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 2x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 3x.png b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 3x.png new file mode 100644 index 0000000..6f028d9 Binary files /dev/null and b/Damso/Global/Resources/Assets.xcassets/CigaretteImg.imageset/ExactlyOpenArea 3x.png differ diff --git a/Damso/Global/Resources/Assets.xcassets/Vector.imageset/Vector.svg b/Damso/Global/Resources/Assets.xcassets/Vector.imageset/Vector.svg deleted file mode 100644 index 42f2bff..0000000 --- a/Damso/Global/Resources/Assets.xcassets/Vector.imageset/Vector.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Damso/Presentation/Bookmark/BookmarkVC.swift b/Damso/Presentation/Bookmark/BookmarkVC.swift index 37bb855..379f158 100644 --- a/Damso/Presentation/Bookmark/BookmarkVC.swift +++ b/Damso/Presentation/Bookmark/BookmarkVC.swift @@ -10,7 +10,7 @@ import UIKit class BookmarkVC: BaseVC { let bookmarkView = BookmarkView() - let bookmarkCell = BookmarkTableViewCell() + let TableViewCell = SmokingAreaTableViewCell() override func loadView(){ view = bookmarkView @@ -20,7 +20,7 @@ class BookmarkVC: BaseVC { bookmarkView.tableView.delegate = self bookmarkView.tableView.dataSource = self - bookmarkView.tableView.register(BookmarkTableViewCell.self, forCellReuseIdentifier: BookmarkTableViewCell.identifier) + bookmarkView.tableView.register(SmokingAreaTableViewCell.self, forCellReuseIdentifier: SmokingAreaTableViewCell.identifier) } @@ -40,7 +40,7 @@ extension BookmarkVC: UITableViewDelegate, UITableViewDataSource{ } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = bookmarkView.tableView.dequeueReusableCell(withIdentifier:BookmarkTableViewCell.identifier, for: indexPath) as? BookmarkTableViewCell else{ return UITableViewCell() } + guard let cell = bookmarkView.tableView.dequeueReusableCell(withIdentifier:SmokingAreaTableViewCell.identifier, for: indexPath) as? SmokingAreaTableViewCell else{ return UITableViewCell() } return cell } diff --git a/Damso/Presentation/Bookmark/BookmarkTableViewCell.swift b/Damso/Presentation/Bookmark/SmokingAreaTableViewCell.swift similarity index 95% rename from Damso/Presentation/Bookmark/BookmarkTableViewCell.swift rename to Damso/Presentation/Bookmark/SmokingAreaTableViewCell.swift index 6eed798..9785251 100644 --- a/Damso/Presentation/Bookmark/BookmarkTableViewCell.swift +++ b/Damso/Presentation/Bookmark/SmokingAreaTableViewCell.swift @@ -9,7 +9,7 @@ import UIKit import SnapKit import Then -class BookmarkTableViewCell: UITableViewCell { +class SmokingAreaTableViewCell: UITableViewCell { static let identifier = "BookmarkTableViewCell" @@ -17,6 +17,8 @@ class BookmarkTableViewCell: UITableViewCell { let areaImgView = UIImageView().then{ $0.backgroundColor = .systemBackgroundColor $0.layer.cornerRadius = 3 + $0.image = UIImage(named: "AreaExactlyOpenImg") + $0.contentMode = .scaleAspectFit } //흡연구역명 레이블 diff --git a/Damso/Presentation/Input/Location/ReportVC.swift b/Damso/Presentation/Input/Location/ReportVC.swift index 563a50a..2ac16bb 100644 --- a/Damso/Presentation/Input/Location/ReportVC.swift +++ b/Damso/Presentation/Input/Location/ReportVC.swift @@ -88,7 +88,6 @@ extension ReportVC: CLLocationManagerDelegate, NMFMapViewTouchDelegate, NMFMapVi GeocodingManager.geocodingManager.callReversedGeocoding(lon: "\(latlng.lng)", lat: "\(latlng.lat)", completionHandler: { addressString in DispatchQueue.main.async { - self.reportView.locationLabel.text = addressString } }) diff --git a/Damso/Presentation/Search/SearchTypeVC.swift b/Damso/Presentation/Search/SearchTypeVC.swift new file mode 100644 index 0000000..212cd1d --- /dev/null +++ b/Damso/Presentation/Search/SearchTypeVC.swift @@ -0,0 +1,17 @@ +// +// SearchTypeVC.swift +// Damso +// +// Created by 문정호 on 2023/02/12. +// + +import UIKit + +class SearchTypeVC: BaseVC { + let searchTypeview = SearchTypeView() + + override func loadView() { + view = self.searchTypeview + } + +} diff --git a/Damso/Presentation/Search/SearchTypeView.swift b/Damso/Presentation/Search/SearchTypeView.swift new file mode 100644 index 0000000..14a4895 --- /dev/null +++ b/Damso/Presentation/Search/SearchTypeView.swift @@ -0,0 +1,100 @@ +// +// SearchTypeView.swift +// Damso +// +// Created by 문정호 on 2023/02/12. +// + +import UIKit +import Then +import SnapKit + +class SearchTypeView: BaseView { + //MARK: - Properties + var imgConfiguration = UIButton.Configuration.plain() + + let typeTitle = UILabel().then{ //시설 형태 라벨 + $0.text = "시설형태" + $0.font = UIFont(name: "NotoSansKR-Bold", size: 16) + } + + lazy var stackView = UIStackView().then{ + $0.axis = .horizontal + $0.spacing = 10 + $0.distribution = .fillEqually //똑같은 스페이스를 둠 + $0.alignment = .fill //정렬 수직 방향은 무조건 채움 + } + + let exactlyOpenButton = UIButton(configuration: UIButton.Configuration.gray()).then{ //완전 개방형 버튼 + $0.configuration?.image = UIImage(named: "AreaExactlyOpenImg") + $0.configuration?.imagePadding = 10 + $0.configuration?.imagePlacement = .top + $0.layer.cornerRadius = 10 + } + let openButton = UIButton(configuration: UIButton.Configuration.gray()).then{ //완전 개방형 버튼 + $0.setImage(UIImage(named: "AreaOpenImg"), for: .normal) + $0.configuration?.imagePadding = 0 + $0.configuration?.imagePlacement = .top + $0.layer.cornerRadius = 10 + } + let closedButton = UIButton(configuration: UIButton.Configuration.gray()).then{ //완전 개방형 버튼 + $0.setImage(UIImage(named: "AreaclosedImg"), for: .normal) + $0.configuration?.imagePadding = 0 + $0.configuration?.imagePlacement = .top + $0.layer.cornerRadius = 10 + } + let exactlyClosedButton = UIButton(configuration: UIButton.Configuration.gray()).then{ //완전 개방형 버튼 + $0.configuration?.subtitle = "완전 폐쇄형" + $0.setImage(UIImage(named: "AreaExactlyClosedImg"), for: .normal) + $0.configuration?.imagePadding = 0 + $0.configuration?.imagePlacement = .top + $0.layer.cornerRadius = 10 + } + + let searchButton = UIButton(configuration: UIButton.Configuration.filled()).then{ + $0.configuration?.title = "검색" + $0.configuration?.cornerStyle = .capsule + $0.configuration?.baseBackgroundColor = .primaryColor + } + + //MARK: - SetupUI + override func setupUI() { + self.addSubview(typeTitle) + self.stackView.addArrangedSubview(exactlyOpenButton) + self.stackView.addArrangedSubview(openButton) + self.stackView.addArrangedSubview(closedButton) + self.stackView.addArrangedSubview(exactlyClosedButton) + self.addSubview(stackView) + self.addSubview(searchButton) + setButtonUI() + } + + //MARK: - SetConstraints + override func setConstraints() { + typeTitle.snp.makeConstraints{make in + make.leading.equalToSuperview().inset(16) + make.top.equalToSuperview().inset(58) + } + stackView.snp.makeConstraints{ make in + make.leading.trailing.equalToSuperview().inset(16) + make.top.equalTo(typeTitle.snp.bottom).offset(12) + make.height.equalTo(70) + } + searchButton.snp.makeConstraints{make in + make.top.equalTo(stackView.snp.bottom).offset(26) + make.trailing.leading.equalToSuperview().inset(109) + make.height.equalTo(44) + } + } + + //MARK: - Helper + func setButtonUI(){ //버튼 UI를 세팅합니다. + var container = AttributeContainer() + container.font = UIFont(name: "NotoSansKR-Regular", size: 10) + container.foregroundColor = UIColor.darkGray + self.exactlyOpenButton.configuration?.attributedTitle = AttributedString("완전 개방형", attributes: container) + self.openButton.configuration?.attributedSubtitle = AttributedString("개방형", attributes: container) + self.closedButton.configuration?.attributedSubtitle = AttributedString("폐쇄형", attributes: container) + self.exactlyClosedButton.configuration?.attributedSubtitle = AttributedString("완전 폐쇄형", attributes: container) + } +} diff --git a/Damso/Presentation/Search/SearchVC.swift b/Damso/Presentation/Search/SearchVC.swift new file mode 100644 index 0000000..c58b1a3 --- /dev/null +++ b/Damso/Presentation/Search/SearchVC.swift @@ -0,0 +1,65 @@ +// +// SearchVC.swift +// Damso +// +// Created by 문정호 on 2023/02/11. +// + +import UIKit + +class SearchVC: BaseVC { + //MARK: - Properties + let searchView = SearchView() + let bookmarkCell = SmokingAreaTableViewCell() + let searchTypeVC = SearchTypeVC() + + + + //MARK: - LoadView + override func loadView(){ + view = searchView + } + + //MARK: - Configure + override func configure(){ + searchView.tableView.delegate = self + searchView.tableView.dataSource = self + searchView.searchButton.action = #selector(setSearchType) + searchView.searchButton.target = self + searchView.tableView.register(SmokingAreaTableViewCell.self, forCellReuseIdentifier: SmokingAreaTableViewCell.identifier) + } + + //MARK: - SetNavigationBar + override func setNavigationBar() { + self.navigationItem.title = "주변 흡연구역" //네비게이션바 타이틀 설정 + self.navigationItem.rightBarButtonItem = searchView.searchButton // 오른쪽에 검색 버튼 + self.navigationController?.navigationBar.backgroundColor = .white //네비게이션 바 배경 색 설정 + } + + @objc func setSearchType(){ + if let sheet = searchTypeVC.sheetPresentationController { //sheet를 띄우는 방식을 컨트롤하는 컨트롤러= + // customize + sheet.detents = [ //present하는 범위를 설정 + .custom { _ in + return 270 //270만큼 올림 + }] + sheet.largestUndimmedDetentIdentifier = .medium + sheet.preferredCornerRadius = 20 //cornerRadius를 줌 + sheet.prefersGrabberVisible = true //상단의 바를 노출시킴 + } + self.present(searchTypeVC, animated: true, completion: nil) + } +} + + +//MARK: - Extenstion +extension SearchVC: UITableViewDelegate, UITableViewDataSource{ + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 5 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = searchView.tableView.dequeueReusableCell(withIdentifier:SmokingAreaTableViewCell.identifier, for: indexPath) as? SmokingAreaTableViewCell else{ return UITableViewCell() } + return cell + } +} diff --git a/Damso/Presentation/Search/SearchView.swift b/Damso/Presentation/Search/SearchView.swift new file mode 100644 index 0000000..3a431d5 --- /dev/null +++ b/Damso/Presentation/Search/SearchView.swift @@ -0,0 +1,34 @@ +// +// SearchView.swift +// Damso +// +// Created by 문정호 on 2023/02/11. +// + +import UIKit +import SnapKit +import Then + +class SearchView: BaseView { + //MARK: - Properties + let tableView = UITableView() //흡연구역을 표시할 테이블뷰 + let searchButton = UIBarButtonItem().then{ + $0.image = UIImage(named: "SearchIcon") + $0.tintColor = .black + } + + //MARK: - setUI + + override func setupUI(){ + self.addSubview(tableView) + } + + + //MARK: - setConstraints + + override func setConstraints() { + tableView.snp.makeConstraints{ make in + make.top.bottom.trailing.leading.equalTo(safeAreaLayoutGuide) + } + } +} diff --git a/Damso/Presentation/TabBar/TabBarController.swift b/Damso/Presentation/TabBar/TabBarController.swift index 6e311b8..4700a9d 100644 --- a/Damso/Presentation/TabBar/TabBarController.swift +++ b/Damso/Presentation/TabBar/TabBarController.swift @@ -17,7 +17,7 @@ class TabBarController: UITabBarController { let report = UINavigationController(rootViewController: ReportVC()) let bookmark = UINavigationController(rootViewController: BookmarkVC()) let main = UINavigationController(rootViewController: MainViewController()) - let search = UINavigationController(rootViewController: SearchViewController()) + let search = UINavigationController(rootViewController: SearchVC()) let myInfo = UINavigationController(rootViewController: MydataVC()) //UITabBarItem 인스턴스를 생성시킨 다음, ViewController의 tabBarItem property에 할당하면 됩니다. diff --git a/Damso/Presentation/main/MainViewController.swift b/Damso/Presentation/main/MainViewController.swift index 028d0a3..3814485 100644 --- a/Damso/Presentation/main/MainViewController.swift +++ b/Damso/Presentation/main/MainViewController.swift @@ -15,8 +15,8 @@ import Alamofire class MainViewController: UIViewController, UISheetPresentationControllerDelegate, CLLocationManagerDelegate{ var locationManager = CLLocationManager() - lazy var pinArr: Array = [] - lazy var markerArr: Array = [] + var pinArr: Array = [] + var markerArr: Array = [] override func viewDidLoad() { @@ -47,34 +47,14 @@ class MainViewController: UIViewController, UISheetPresentationControllerDelegat print("위치 서비스 Off 상태") } - // var marker = NMFMarker() - // marker.position = NMGLatLng(lat: 37.5670135, lng: 126.9783740) - // marker.mapView = mapView - //let markersHTTPMethod = MarkersHTTPMethod() - - //private init() {} - - - //marker.iconImage = NMFOverlayImage(name: "marker_icon") - - for i in 0...9 { - MarkersHTTPMethod.markersHTTPMethod.callPin() { pinInfoArr in - DispatchQueue.main.async { - self.pinArr = pinInfoArr - // print(self.pinArr) - self.markerArr.append(NMFMarker(position: NMGLatLng(lat: Double(pinInfoArr[i].la)!, lng: Double(pinInfoArr[i].lo)!))) - self.markerArr[self.markerArr.count-1].mapView = naverMapView.mapView - } + MarkersHTTPMethod.markersHTTPMethod.callPin() { pinInfoArr in + self.pinArr = pinInfoArr + for i in 0...9 { + self.markerArr.append(NMFMarker(position: NMGLatLng(lat: Double(pinInfoArr[i].la)!, lng: Double(pinInfoArr[i].lo)!))) + self.markerArr[self.markerArr.count-1].mapView = naverMapView.mapView } - print(self.pinArr) - - - // markerArr.append(NMFMarker(position: NMGLatLng(lat: Double(pinArr[i].la)!, lng: Double(pinArr[i].lo)!))) - // markerArr[i].mapView = naverMapView.mapView + } } - - - }