diff --git a/LGHTSG/LGHTSG.xcodeproj/project.pbxproj b/LGHTSG/LGHTSG.xcodeproj/project.pbxproj index 6f29040..2dc015b 100644 --- a/LGHTSG/LGHTSG.xcodeproj/project.pbxproj +++ b/LGHTSG/LGHTSG.xcodeproj/project.pbxproj @@ -19,6 +19,71 @@ 07557561296BFC5900B8AF77 /* MainTabController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07557560296BFC5900B8AF77 /* MainTabController.swift */; }; 07557563296BFCD300B8AF77 /* Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07557562296BFCD300B8AF77 /* Cell.swift */; }; 8E910354CAD5238FB38C267D /* Pods_LGHTSG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A81FE00F91FA41642246A20 /* Pods_LGHTSG.framework */; }; +<<<<<<< Updated upstream + F51D92FE29803EB300DFC7E4 /* LoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51D92FD29803EB300DFC7E4 /* LoginModel.swift */; }; + F51D930029803EE700DFC7E4 /* emailCheckModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51D92FF29803EE700DFC7E4 /* emailCheckModel.swift */; }; + F51D930229803F3D00DFC7E4 /* NanumSquareR.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F51D930129803F3D00DFC7E4 /* NanumSquareR.ttf */; }; + F51D930429803F4500DFC7E4 /* NanumSquareB.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F51D930329803F4500DFC7E4 /* NanumSquareB.ttf */; }; + F51D930629803FBA00DFC7E4 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51D930529803FBA00DFC7E4 /* LoginView.swift */; }; + F51D9308298042E500DFC7E4 /* Login.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51D9307298042E500DFC7E4 /* Login.swift */; }; + F526375929894532001CCCBE /* changePw.swift in Sources */ = {isa = PBXBuildFile; fileRef = F526375829894532001CCCBE /* changePw.swift */; }; + F526375B298945D2001CCCBE /* ChangePwApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F526375A298945D2001CCCBE /* ChangePwApiModel.swift */; }; + F5828A4929821B9900C870B3 /* LoginApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A4829821B9900C870B3 /* LoginApiModel.swift */; }; + F5828A4B2982B5F100C870B3 /* LoginApiHeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A4A2982B5F100C870B3 /* LoginApiHeaderModel.swift */; }; + F5828A532982BC7500C870B3 /* MyPageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A522982BC7500C870B3 /* MyPageController.swift */; }; + F5828A552982BCCB00C870B3 /* MyPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A542982BCCB00C870B3 /* MyPageView.swift */; }; + F5828A572982BDA600C870B3 /* FindPasswordController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A562982BDA600C870B3 /* FindPasswordController.swift */; }; + F5828A592982C15A00C870B3 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A582982C15A00C870B3 /* LoginResultModel.swift */; }; + F5828A5B2983B2D300C870B3 /* email.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A5A2983B2D300C870B3 /* email.swift */; }; + F5828A5D2983B34500C870B3 /* emailApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5828A5C2983B34500C870B3 /* emailApiModel.swift */; }; + F588D50F2980FDDF00D4E588 /* StartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D50E2980FDDF00D4E588 /* StartView.swift */; }; + F588D5112981096A00D4E588 /* FindPwView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D5102981096A00D4E588 /* FindPwView.swift */; }; + F588D515298122A100D4E588 /* RegisterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D514298122A100D4E588 /* RegisterView.swift */; }; + F588D517298149AE00D4E588 /* CheckAgreeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D516298149AD00D4E588 /* CheckAgreeView.swift */; }; + F588D51929814A5400D4E588 /* CheckAgreeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D51829814A5400D4E588 /* CheckAgreeController.swift */; }; + F588D51B2981604500D4E588 /* CheckPageServiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D51A2981604500D4E588 /* CheckPageServiceView.swift */; }; + F588D51D2981605D00D4E588 /* CheckPagePrivacyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D51C2981605D00D4E588 /* CheckPagePrivacyView.swift */; }; + F588D51F2981607400D4E588 /* CheckPageMarketingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D51E2981607400D4E588 /* CheckPageMarketingView.swift */; }; + F588D5212981614100D4E588 /* CheckPageServiceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D5202981614100D4E588 /* CheckPageServiceController.swift */; }; + F588D5232981615A00D4E588 /* CheckPagePrivacyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D5222981615A00D4E588 /* CheckPagePrivacyController.swift */; }; + F588D5252981616D00D4E588 /* CheckPageMarketingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F588D5242981616D00D4E588 /* CheckPageMarketingController.swift */; }; + F59B5F952984F98A007F13CA /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59B5F942984F98A007F13CA /* join.swift */; }; + F59B5F972984F9B5007F13CA /* JoinApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59B5F962984F9B5007F13CA /* JoinApiModel.swift */; }; + F59B5F992985453D007F13CA /* JoinSuccessView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59B5F982985453D007F13CA /* JoinSuccessView.swift */; }; + F59B5F9C29854741007F13CA /* RegisterationSuccessController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59B5F9B29854741007F13CA /* RegisterationSuccessController.swift */; }; + F59B5F9E29854B89007F13CA /* user.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59B5F9D29854B89007F13CA /* user.swift */; }; +======= + F52989F4298A63FB00C5B85C /* login.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989F3298A63FB00C5B85C /* login.swift */; }; + F52989F6298A640600C5B85C /* email.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989F5298A640600C5B85C /* email.swift */; }; + F52989F8298A641300C5B85C /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989F7298A641300C5B85C /* join.swift */; }; + F52989FA298A641F00C5B85C /* user.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989F9298A641F00C5B85C /* user.swift */; }; + F52989FC298A642D00C5B85C /* changePw.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989FB298A642D00C5B85C /* changePw.swift */; }; + F52989FF298A645100C5B85C /* RegisterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52989FE298A645100C5B85C /* RegisterView.swift */; }; + F5298A01298A646600C5B85C /* JoinSuccessView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A00298A646600C5B85C /* JoinSuccessView.swift */; }; + F5298A04298A64C300C5B85C /* CheckAgreeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A03298A64C300C5B85C /* CheckAgreeView.swift */; }; + F5298A06298A64CA00C5B85C /* CheckPageServiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A05298A64CA00C5B85C /* CheckPageServiceView.swift */; }; + F5298A08298A64D300C5B85C /* CheckPagePrivacyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A07298A64D300C5B85C /* CheckPagePrivacyView.swift */; }; + F5298A0A298A64DB00C5B85C /* CheckPageMarketingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A09298A64DB00C5B85C /* CheckPageMarketingView.swift */; }; + F5298A0C298A64FE00C5B85C /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A0B298A64FE00C5B85C /* LoginView.swift */; }; + F5298A0E298A651700C5B85C /* StartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A0D298A651700C5B85C /* StartView.swift */; }; + F5298A10298A652400C5B85C /* FindPwView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A0F298A652400C5B85C /* FindPwView.swift */; }; + F5298A12298A653C00C5B85C /* LoginApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A11298A653C00C5B85C /* LoginApiModel.swift */; }; + F5298A14298A654B00C5B85C /* LoginApiHeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A13298A654B00C5B85C /* LoginApiHeaderModel.swift */; }; + F5298A16298A655700C5B85C /* emailApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A15298A655700C5B85C /* emailApiModel.swift */; }; + F5298A18298A656400C5B85C /* JoinApiModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A17298A656400C5B85C /* JoinApiModel.swift */; }; + F5298A1A298A657700C5B85C /* ChangePwModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A19298A657700C5B85C /* ChangePwModel.swift */; }; + F5298A1C298A661000C5B85C /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A1B298A661000C5B85C /* LoginResultModel.swift */; }; + F5298A1E298A666700C5B85C /* FindPasswordController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A1D298A666700C5B85C /* FindPasswordController.swift */; }; + F5298A21298A66A900C5B85C /* CheckAgreeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A20298A66A900C5B85C /* CheckAgreeController.swift */; }; + F5298A23298A66B700C5B85C /* CheckPageMarketingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A22298A66B700C5B85C /* CheckPageMarketingController.swift */; }; + F5298A25298A66C000C5B85C /* CheckPageServiceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A24298A66C000C5B85C /* CheckPageServiceController.swift */; }; + F5298A27298A66C800C5B85C /* CheckPagePrivacyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A26298A66C800C5B85C /* CheckPagePrivacyController.swift */; }; + F5298A29298A66F800C5B85C /* RegisterationSuccessController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A28298A66F800C5B85C /* RegisterationSuccessController.swift */; }; + F5298A2F298A6F1600C5B85C /* NanumSquareR.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F5298A2E298A6F1500C5B85C /* NanumSquareR.ttf */; }; + F5298A31298A6F1D00C5B85C /* NanumSquareB.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F5298A30298A6F1D00C5B85C /* NanumSquareB.ttf */; }; + F5298A34298A723800C5B85C /* MyPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A33298A723800C5B85C /* MyPageView.swift */; }; + F5298A36298A728D00C5B85C /* MyPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5298A35298A728D00C5B85C /* MyPageViewController.swift */; }; +>>>>>>> Stashed changes /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -36,6 +101,71 @@ 1A81FE00F91FA41642246A20 /* Pods_LGHTSG.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LGHTSG.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6F7EA128F8EC33ED812CADCA /* Pods-LGHTSG.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LGHTSG.release.xcconfig"; path = "Target Support Files/Pods-LGHTSG/Pods-LGHTSG.release.xcconfig"; sourceTree = ""; }; 9154F7534146417B8EBDBECC /* Pods-LGHTSG.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LGHTSG.debug.xcconfig"; path = "Target Support Files/Pods-LGHTSG/Pods-LGHTSG.debug.xcconfig"; sourceTree = ""; }; +<<<<<<< Updated upstream + F51D92FD29803EB300DFC7E4 /* LoginModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginModel.swift; sourceTree = ""; }; + F51D92FF29803EE700DFC7E4 /* emailCheckModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = emailCheckModel.swift; sourceTree = ""; }; + F51D930129803F3D00DFC7E4 /* NanumSquareR.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = NanumSquareR.ttf; path = ../../../../../Downloads/NaverNanumSquare/NanumFontSetup_TTF_SQUARE/NanumSquareR.ttf; sourceTree = ""; }; + F51D930329803F4500DFC7E4 /* NanumSquareB.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = NanumSquareB.ttf; path = ../../../../../Downloads/NaverNanumSquare/NanumFontSetup_TTF_SQUARE/NanumSquareB.ttf; sourceTree = ""; }; + F51D930529803FBA00DFC7E4 /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + F51D9307298042E500DFC7E4 /* Login.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Login.swift; sourceTree = ""; }; + F526375829894532001CCCBE /* changePw.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = changePw.swift; sourceTree = ""; }; + F526375A298945D2001CCCBE /* ChangePwApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangePwApiModel.swift; sourceTree = ""; }; + F5828A4829821B9900C870B3 /* LoginApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginApiModel.swift; sourceTree = ""; }; + F5828A4A2982B5F100C870B3 /* LoginApiHeaderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginApiHeaderModel.swift; sourceTree = ""; }; + F5828A522982BC7500C870B3 /* MyPageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageController.swift; sourceTree = ""; }; + F5828A542982BCCB00C870B3 /* MyPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageView.swift; sourceTree = ""; }; + F5828A562982BDA600C870B3 /* FindPasswordController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindPasswordController.swift; sourceTree = ""; }; + F5828A582982C15A00C870B3 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + F5828A5A2983B2D300C870B3 /* email.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = email.swift; sourceTree = ""; }; + F5828A5C2983B34500C870B3 /* emailApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = emailApiModel.swift; sourceTree = ""; }; + F588D50E2980FDDF00D4E588 /* StartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartView.swift; sourceTree = ""; }; + F588D5102981096A00D4E588 /* FindPwView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindPwView.swift; sourceTree = ""; }; + F588D514298122A100D4E588 /* RegisterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterView.swift; sourceTree = ""; }; + F588D516298149AD00D4E588 /* CheckAgreeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckAgreeView.swift; sourceTree = ""; }; + F588D51829814A5400D4E588 /* CheckAgreeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckAgreeController.swift; sourceTree = ""; }; + F588D51A2981604500D4E588 /* CheckPageServiceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageServiceView.swift; sourceTree = ""; }; + F588D51C2981605D00D4E588 /* CheckPagePrivacyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPagePrivacyView.swift; sourceTree = ""; }; + F588D51E2981607400D4E588 /* CheckPageMarketingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageMarketingView.swift; sourceTree = ""; }; + F588D5202981614100D4E588 /* CheckPageServiceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageServiceController.swift; sourceTree = ""; }; + F588D5222981615A00D4E588 /* CheckPagePrivacyController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPagePrivacyController.swift; sourceTree = ""; }; + F588D5242981616D00D4E588 /* CheckPageMarketingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageMarketingController.swift; sourceTree = ""; }; + F59B5F942984F98A007F13CA /* join.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = join.swift; sourceTree = ""; }; + F59B5F962984F9B5007F13CA /* JoinApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinApiModel.swift; sourceTree = ""; }; + F59B5F982985453D007F13CA /* JoinSuccessView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinSuccessView.swift; sourceTree = ""; }; + F59B5F9B29854741007F13CA /* RegisterationSuccessController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterationSuccessController.swift; sourceTree = ""; }; + F59B5F9D29854B89007F13CA /* user.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = user.swift; sourceTree = ""; }; +======= + F52989F3298A63FB00C5B85C /* login.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = login.swift; sourceTree = ""; }; + F52989F5298A640600C5B85C /* email.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = email.swift; sourceTree = ""; }; + F52989F7298A641300C5B85C /* join.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = join.swift; sourceTree = ""; }; + F52989F9298A641F00C5B85C /* user.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = user.swift; sourceTree = ""; }; + F52989FB298A642D00C5B85C /* changePw.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = changePw.swift; sourceTree = ""; }; + F52989FE298A645100C5B85C /* RegisterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterView.swift; sourceTree = ""; }; + F5298A00298A646600C5B85C /* JoinSuccessView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinSuccessView.swift; sourceTree = ""; }; + F5298A03298A64C300C5B85C /* CheckAgreeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckAgreeView.swift; sourceTree = ""; }; + F5298A05298A64CA00C5B85C /* CheckPageServiceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageServiceView.swift; sourceTree = ""; }; + F5298A07298A64D300C5B85C /* CheckPagePrivacyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPagePrivacyView.swift; sourceTree = ""; }; + F5298A09298A64DB00C5B85C /* CheckPageMarketingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageMarketingView.swift; sourceTree = ""; }; + F5298A0B298A64FE00C5B85C /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + F5298A0D298A651700C5B85C /* StartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartView.swift; sourceTree = ""; }; + F5298A0F298A652400C5B85C /* FindPwView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindPwView.swift; sourceTree = ""; }; + F5298A11298A653C00C5B85C /* LoginApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginApiModel.swift; sourceTree = ""; }; + F5298A13298A654B00C5B85C /* LoginApiHeaderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginApiHeaderModel.swift; sourceTree = ""; }; + F5298A15298A655700C5B85C /* emailApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = emailApiModel.swift; sourceTree = ""; }; + F5298A17298A656400C5B85C /* JoinApiModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinApiModel.swift; sourceTree = ""; }; + F5298A19298A657700C5B85C /* ChangePwModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangePwModel.swift; sourceTree = ""; }; + F5298A1B298A661000C5B85C /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + F5298A1D298A666700C5B85C /* FindPasswordController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindPasswordController.swift; sourceTree = ""; }; + F5298A20298A66A900C5B85C /* CheckAgreeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckAgreeController.swift; sourceTree = ""; }; + F5298A22298A66B700C5B85C /* CheckPageMarketingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageMarketingController.swift; sourceTree = ""; }; + F5298A24298A66C000C5B85C /* CheckPageServiceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPageServiceController.swift; sourceTree = ""; }; + F5298A26298A66C800C5B85C /* CheckPagePrivacyController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPagePrivacyController.swift; sourceTree = ""; }; + F5298A28298A66F800C5B85C /* RegisterationSuccessController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterationSuccessController.swift; sourceTree = ""; }; + F5298A2E298A6F1500C5B85C /* NanumSquareR.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = NanumSquareR.ttf; path = ../../../../../Downloads/NaverNanumSquare/NanumFontSetup_TTF_SQUARE/NanumSquareR.ttf; sourceTree = ""; }; + F5298A30298A6F1D00C5B85C /* NanumSquareB.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = NanumSquareB.ttf; path = ../../../../../Downloads/NaverNanumSquare/NanumFontSetup_TTF_SQUARE/NanumSquareB.ttf; sourceTree = ""; }; + F5298A33298A723800C5B85C /* MyPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageView.swift; sourceTree = ""; }; + F5298A35298A728D00C5B85C /* MyPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageViewController.swift; sourceTree = ""; }; +>>>>>>> Stashed changes /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -79,7 +209,6 @@ 071E055A296BB88B0020282F /* Controller */, 071E0557296BB83F0020282F /* Network */, 071E0555296BB82F0020282F /* App */, - 071E0544296BB7B50020282F /* ViewController.swift */, 071E0549296BB7B70020282F /* Assets.xcassets */, 071E054B296BB7B70020282F /* LaunchScreen.storyboard */, 071E054E296BB7B70020282F /* Info.plist */, @@ -91,6 +220,27 @@ 071E0554296BB8210020282F /* Model */ = { isa = PBXGroup; children = ( +<<<<<<< Updated upstream + F51D92FF29803EE700DFC7E4 /* emailCheckModel.swift */, + F51D92FD29803EB300DFC7E4 /* LoginModel.swift */, + F5828A582982C15A00C870B3 /* LoginResultModel.swift */, + F51D9307298042E500DFC7E4 /* Login.swift */, + F5828A5A2983B2D300C870B3 /* email.swift */, + F59B5F942984F98A007F13CA /* join.swift */, + F59B5F9D29854B89007F13CA /* user.swift */, + F526375829894532001CCCBE /* changePw.swift */, +======= + 078401D1298A49E200CDE061 /* asset.swift */, + 078401BE298A486300CDE061 /* realEstates.swift */, + 078401C0298A486300CDE061 /* ResellPrice.swift */, + 078401BF298A486300CDE061 /* StockPrice.swift */, + 078666BB2980BF9B000ADCBE /* ReverseModel.swift */, + 078666BD2983844D000ADCBE /* GeocodingModel.swift */, + 0764F26C2986653500F446CB /* AreaListModel.swift */, + 0764F2702987853600F446CB /* EstateModel.swift */, + F5298A1B298A661000C5B85C /* LoginResultModel.swift */, + F5298A32298A713000C5B85C /* login&join&changepw */, +>>>>>>> Stashed changes ); path = Model; sourceTree = ""; @@ -107,6 +257,23 @@ 071E0556296BB8380020282F /* ViewModel */ = { isa = PBXGroup; children = ( +<<<<<<< Updated upstream + F5828A4829821B9900C870B3 /* LoginApiModel.swift */, + F5828A4A2982B5F100C870B3 /* LoginApiHeaderModel.swift */, + F5828A5C2983B34500C870B3 /* emailApiModel.swift */, + F59B5F962984F9B5007F13CA /* JoinApiModel.swift */, + F526375A298945D2001CCCBE /* ChangePwApiModel.swift */, +======= + F5298A11298A653C00C5B85C /* LoginApiModel.swift */, + F5298A13298A654B00C5B85C /* LoginApiHeaderModel.swift */, + 078401E4298A4B2C00CDE061 /* StockPriceModel.swift */, + 078401E5298A4B2D00CDE061 /* TableCellModel.swift */, + 078401D5298A49E300CDE061 /* AssetModel.swift */, + 078401C1298A486300CDE061 /* EstatePriceModel.swift */, + F5298A15298A655700C5B85C /* emailApiModel.swift */, + F5298A17298A656400C5B85C /* JoinApiModel.swift */, + F5298A19298A657700C5B85C /* ChangePwModel.swift */, +>>>>>>> Stashed changes ); path = ViewModel; sourceTree = ""; @@ -121,7 +288,27 @@ 071E0558296BB8510020282F /* View */ = { isa = PBXGroup; children = ( +<<<<<<< Updated upstream + F59B5F9A2985454C007F13CA /* with RegisterView */, 07557562296BFCD300B8AF77 /* Cell.swift */, + F51D930529803FBA00DFC7E4 /* LoginView.swift */, + F588D50E2980FDDF00D4E588 /* StartView.swift */, + F588D5102981096A00D4E588 /* FindPwView.swift */, + F5828A542982BCCB00C870B3 /* MyPageView.swift */, +======= + F5298A02298A64B500C5B85C /* CheckView */, + F52989FD298A643E00C5B85C /* with RegisterView */, + 078401CF298A49DB00CDE061 /* New Group1 */, + 078401C8298A49CB00CDE061 /* New Group */, + 0791E9282984B395008BDEAB /* EstateSaleCell.swift */, + 0764F26A298642EF00F446CB /* SearchItemCell.swift */, + 078401A6298A481A00CDE061 /* EstateSaleCell.swift */, + 0764F284298959C600F446CB /* TopViewCell.swift */, + F5298A0B298A64FE00C5B85C /* LoginView.swift */, + F5298A0D298A651700C5B85C /* StartView.swift */, + F5298A0F298A652400C5B85C /* FindPwView.swift */, + F5298A33298A723800C5B85C /* MyPageView.swift */, +>>>>>>> Stashed changes ); path = View; sourceTree = ""; @@ -129,6 +316,13 @@ 071E0559296BB86E0020282F /* Font */ = { isa = PBXGroup; children = ( +<<<<<<< Updated upstream + F51D930129803F3D00DFC7E4 /* NanumSquareR.ttf */, + F51D930329803F4500DFC7E4 /* NanumSquareB.ttf */, +======= + F5298A2E298A6F1500C5B85C /* NanumSquareR.ttf */, + F5298A30298A6F1D00C5B85C /* NanumSquareB.ttf */, +>>>>>>> Stashed changes ); path = Font; sourceTree = ""; @@ -136,8 +330,13 @@ 071E055A296BB88B0020282F /* Controller */ = { isa = PBXGroup; children = ( + F5298A1F298A669C00C5B85C /* CheckController */, 0755755A296BFC2100B8AF77 /* Authentication */, 07557560296BFC5900B8AF77 /* MainTabController.swift */, + F5828A522982BC7500C870B3 /* MyPageController.swift */, + 071E0544296BB7B50020282F /* ViewController.swift */, + F5828A562982BDA600C870B3 /* FindPasswordController.swift */, + F5828A4D2982BBBE00C870B3 /* CheckController */, ); path = Controller; sourceTree = ""; @@ -147,6 +346,13 @@ children = ( 0755755B296BFC3300B8AF77 /* LoginController.swift */, 0755755E296BFC4B00B8AF77 /* RegisterationController.swift */, +<<<<<<< Updated upstream + F59B5F9B29854741007F13CA /* RegisterationSuccessController.swift */, +======= + F5298A28298A66F800C5B85C /* RegisterationSuccessController.swift */, + F5298A1D298A666700C5B85C /* FindPasswordController.swift */, + F5298A35298A728D00C5B85C /* MyPageViewController.swift */, +>>>>>>> Stashed changes ); path = Authentication; sourceTree = ""; @@ -168,6 +374,83 @@ name = Frameworks; sourceTree = ""; }; +<<<<<<< Updated upstream + F5828A4C2982BBA700C870B3 /* CheckView */ = { + isa = PBXGroup; + children = ( + F588D516298149AD00D4E588 /* CheckAgreeView.swift */, + F588D51A2981604500D4E588 /* CheckPageServiceView.swift */, + F588D51C2981605D00D4E588 /* CheckPagePrivacyView.swift */, + F588D51E2981607400D4E588 /* CheckPageMarketingView.swift */, + ); + path = CheckView; + sourceTree = ""; + }; + F5828A4D2982BBBE00C870B3 /* CheckController */ = { + isa = PBXGroup; + children = ( + F588D51829814A5400D4E588 /* CheckAgreeController.swift */, + F588D5202981614100D4E588 /* CheckPageServiceController.swift */, + F588D5222981615A00D4E588 /* CheckPagePrivacyController.swift */, + F588D5242981616D00D4E588 /* CheckPageMarketingController.swift */, + ); + path = CheckController; + sourceTree = ""; + }; + F59B5F9A2985454C007F13CA /* with RegisterView */ = { + isa = PBXGroup; + children = ( + F588D514298122A100D4E588 /* RegisterView.swift */, + F59B5F982985453D007F13CA /* JoinSuccessView.swift */, + F5828A4C2982BBA700C870B3 /* CheckView */, +======= + F52989FD298A643E00C5B85C /* with RegisterView */ = { + isa = PBXGroup; + children = ( + F52989FE298A645100C5B85C /* RegisterView.swift */, + F5298A00298A646600C5B85C /* JoinSuccessView.swift */, +>>>>>>> Stashed changes + ); + path = "with RegisterView"; + sourceTree = ""; + }; +<<<<<<< Updated upstream +======= + F5298A02298A64B500C5B85C /* CheckView */ = { + isa = PBXGroup; + children = ( + F5298A03298A64C300C5B85C /* CheckAgreeView.swift */, + F5298A05298A64CA00C5B85C /* CheckPageServiceView.swift */, + F5298A07298A64D300C5B85C /* CheckPagePrivacyView.swift */, + F5298A09298A64DB00C5B85C /* CheckPageMarketingView.swift */, + ); + path = CheckView; + sourceTree = ""; + }; + F5298A1F298A669C00C5B85C /* CheckController */ = { + isa = PBXGroup; + children = ( + F5298A20298A66A900C5B85C /* CheckAgreeController.swift */, + F5298A22298A66B700C5B85C /* CheckPageMarketingController.swift */, + F5298A24298A66C000C5B85C /* CheckPageServiceController.swift */, + F5298A26298A66C800C5B85C /* CheckPagePrivacyController.swift */, + ); + path = CheckController; + sourceTree = ""; + }; + F5298A32298A713000C5B85C /* login&join&changepw */ = { + isa = PBXGroup; + children = ( + F52989F3298A63FB00C5B85C /* login.swift */, + F52989F5298A640600C5B85C /* email.swift */, + F52989F7298A641300C5B85C /* join.swift */, + F52989FB298A642D00C5B85C /* changePw.swift */, + F52989F9298A641F00C5B85C /* user.swift */, + ); + path = "login&join&changepw"; + sourceTree = ""; + }; +>>>>>>> Stashed changes /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -236,7 +519,15 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( +<<<<<<< Updated upstream 071E054D296BB7B70020282F /* LaunchScreen.storyboard in Resources */, + F51D930229803F3D00DFC7E4 /* NanumSquareR.ttf in Resources */, + F51D930429803F4500DFC7E4 /* NanumSquareB.ttf in Resources */, +======= + 078401C7298A496B00CDE061 /* LaunchScreen.storyboard in Resources */, + F5298A2F298A6F1600C5B85C /* NanumSquareR.ttf in Resources */, + F5298A31298A6F1D00C5B85C /* NanumSquareB.ttf in Resources */, +>>>>>>> Stashed changes 071E054A296BB7B70020282F /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -290,13 +581,113 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( +<<<<<<< Updated upstream 071E0545296BB7B50020282F /* ViewController.swift in Sources */, + F51D930029803EE700DFC7E4 /* emailCheckModel.swift in Sources */, 0755755C296BFC3300B8AF77 /* LoginController.swift in Sources */, 07557563296BFCD300B8AF77 /* Cell.swift in Sources */, + F588D5212981614100D4E588 /* CheckPageServiceController.swift in Sources */, + F588D51B2981604500D4E588 /* CheckPageServiceView.swift in Sources */, + F526375929894532001CCCBE /* changePw.swift in Sources */, + F5828A592982C15A00C870B3 /* LoginResultModel.swift in Sources */, + F588D5252981616D00D4E588 /* CheckPageMarketingController.swift in Sources */, + F59B5F972984F9B5007F13CA /* JoinApiModel.swift in Sources */, 07557561296BFC5900B8AF77 /* MainTabController.swift in Sources */, + F59B5F952984F98A007F13CA /* join.swift in Sources */, + F588D50F2980FDDF00D4E588 /* StartView.swift in Sources */, + F59B5F992985453D007F13CA /* JoinSuccessView.swift in Sources */, + F588D5112981096A00D4E588 /* FindPwView.swift in Sources */, + F5828A4929821B9900C870B3 /* LoginApiModel.swift in Sources */, + F51D92FE29803EB300DFC7E4 /* LoginModel.swift in Sources */, + F588D517298149AE00D4E588 /* CheckAgreeView.swift in Sources */, + F588D51F2981607400D4E588 /* CheckPageMarketingView.swift in Sources */, + F5828A5B2983B2D300C870B3 /* email.swift in Sources */, + F51D9308298042E500DFC7E4 /* Login.swift in Sources */, + F59B5F9C29854741007F13CA /* RegisterationSuccessController.swift in Sources */, + F5828A552982BCCB00C870B3 /* MyPageView.swift in Sources */, + F588D51D2981605D00D4E588 /* CheckPagePrivacyView.swift in Sources */, +======= + 078401DB298A49E300CDE061 /* asset.swift in Sources */, + 0783C0FA297034FA00EDABA3 /* EstateController.swift in Sources */, + 078401DA298A49E300CDE061 /* ChartMarker.swift in Sources */, + 0764F285298959C600F446CB /* TopViewCell.swift in Sources */, + F5298A1A298A657700C5B85C /* ChangePwModel.swift in Sources */, + F5298A12298A653C00C5B85C /* LoginApiModel.swift in Sources */, + 078401C2298A486300CDE061 /* realEstates.swift in Sources */, + 078401B8298A484800CDE061 /* StockChartViewController.swift in Sources */, + 078401DF298A49E300CDE061 /* AssetModel.swift in Sources */, + 078401DE298A49E300CDE061 /* UnderlineSegmentedControl.swift in Sources */, + 078401B7298A484800CDE061 /* EstateController.swift in Sources */, + 078401BC298A484800CDE061 /* ChartViewController.swift in Sources */, + F52989FC298A642D00C5B85C /* changePw.swift in Sources */, + 0791E9292984B395008BDEAB /* EstateSaleCell.swift in Sources */, + 078401C5298A486300CDE061 /* EstatePriceModel.swift in Sources */, + F5298A36298A728D00C5B85C /* MyPageViewController.swift in Sources */, + 078401BB298A484800CDE061 /* HomeViewController.swift in Sources */, + 071E0545296BB7B50020282F /* ViewController.swift in Sources */, + F5298A34298A723800C5B85C /* MyPageView.swift in Sources */, + 0764F2712987853600F446CB /* EstateModel.swift in Sources */, + 078401CE298A49D500CDE061 /* resellView.swift in Sources */, + 0755755C296BFC3300B8AF77 /* LoginController.swift in Sources */, + 078401DD298A49E300CDE061 /* StockDateSegmentControl.swift in Sources */, + 078401BD298A484800CDE061 /* ExploreViewController.swift in Sources */, + F5298A25298A66C000C5B85C /* CheckPageServiceController.swift in Sources */, + 078401CC298A49D500CDE061 /* StockView.swift in Sources */, + F5298A1E298A666700C5B85C /* FindPasswordController.swift in Sources */, + 078401E3298A49E300CDE061 /* UnderlineView.swift in Sources */, + 078401E1298A49E300CDE061 /* HomeTableCell.swift in Sources */, + 0764F26B298642EF00F446CB /* SearchItemCell.swift in Sources */, + F5298A08298A64D300C5B85C /* CheckPagePrivacyView.swift in Sources */, + F5298A0A298A64DB00C5B85C /* CheckPageMarketingView.swift in Sources */, + F5298A18298A656400C5B85C /* JoinApiModel.swift in Sources */, + F5298A1C298A661000C5B85C /* LoginResultModel.swift in Sources */, + F5298A04298A64C300C5B85C /* CheckAgreeView.swift in Sources */, + F5298A10298A652400C5B85C /* FindPwView.swift in Sources */, + 078401E7298A4B2D00CDE061 /* TableCellModel.swift in Sources */, + 078401E9298A4C2600CDE061 /* TopViewController.swift in Sources */, +>>>>>>> Stashed changes 071E0541296BB7B50020282F /* AppDelegate.swift in Sources */, + F51D930629803FBA00DFC7E4 /* LoginView.swift in Sources */, + F59B5F9E29854B89007F13CA /* user.swift in Sources */, + F526375B298945D2001CCCBE /* ChangePwApiModel.swift in Sources */, + F588D515298122A100D4E588 /* RegisterView.swift in Sources */, + F5828A572982BDA600C870B3 /* FindPasswordController.swift in Sources */, + F588D51929814A5400D4E588 /* CheckAgreeController.swift in Sources */, 071E0543296BB7B50020282F /* SceneDelegate.swift in Sources */, +<<<<<<< Updated upstream + F5828A5D2983B34500C870B3 /* emailApiModel.swift in Sources */, + F588D5232981615A00D4E588 /* CheckPagePrivacyController.swift in Sources */, +======= + F5298A16298A655700C5B85C /* emailApiModel.swift in Sources */, + F5298A0E298A651700C5B85C /* StartView.swift in Sources */, + 0764F26F29866A6500F446CB /* APIToken.swift in Sources */, + 078401C4298A486300CDE061 /* ResellPrice.swift in Sources */, + 078401AA298A481A00CDE061 /* EstateSaleCell.swift in Sources */, + F5298A23298A66B700C5B85C /* CheckPageMarketingController.swift in Sources */, + 078401B9298A484800CDE061 /* ChartsModel.swift in Sources */, + F52989F4298A63FB00C5B85C /* login.swift in Sources */, + F5298A29298A66F800C5B85C /* RegisterationSuccessController.swift in Sources */, + 078401E6298A4B2D00CDE061 /* StockPriceModel.swift in Sources */, + F5298A01298A646600C5B85C /* JoinSuccessView.swift in Sources */, + F5298A27298A66C800C5B85C /* CheckPagePrivacyController.swift in Sources */, + 078401CD298A49D500CDE061 /* EstateDetailCell.swift in Sources */, + 078666BC2980BF9B000ADCBE /* ReverseModel.swift in Sources */, + F52989FF298A645100C5B85C /* RegisterView.swift in Sources */, + F5298A14298A654B00C5B85C /* LoginApiHeaderModel.swift in Sources */, + F52989FA298A641F00C5B85C /* user.swift in Sources */, + F5298A21298A66A900C5B85C /* CheckAgreeController.swift in Sources */, + F52989F8298A641300C5B85C /* join.swift in Sources */, + F5298A0C298A64FE00C5B85C /* LoginView.swift in Sources */, + 078401B6298A484800CDE061 /* MainTabController.swift in Sources */, + 078401C3298A486300CDE061 /* StockPrice.swift in Sources */, + 078666BE2983844D000ADCBE /* GeocodingModel.swift in Sources */, + F5298A06298A64CA00C5B85C /* CheckPageServiceView.swift in Sources */, + 0764F26D2986653500F446CB /* AreaListModel.swift in Sources */, + F52989F6298A640600C5B85C /* email.swift in Sources */, +>>>>>>> Stashed changes 0755755F296BFC4B00B8AF77 /* RegisterationController.swift in Sources */, + F5828A532982BC7500C870B3 /* MyPageController.swift in Sources */, + F5828A4B2982B5F100C870B3 /* LoginApiHeaderModel.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -436,7 +827,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2V279GTPCN; + DEVELOPMENT_TEAM = 9KQS6UJ9YX; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = LGHTSG/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -465,7 +856,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2V279GTPCN; + DEVELOPMENT_TEAM = 9KQS6UJ9YX; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = LGHTSG/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -478,7 +869,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.Ha.LGHTSG; + PRODUCT_BUNDLE_IDENTIFIER = com.kry.LGHTSG; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/LGHTSG/LGHTSG.xcodeproj/xcshareddata/xcschemes/LGHTSG.xcscheme b/LGHTSG/LGHTSG.xcodeproj/xcshareddata/xcschemes/LGHTSG.xcscheme new file mode 100644 index 0000000..abb200a --- /dev/null +++ b/LGHTSG/LGHTSG.xcodeproj/xcshareddata/xcschemes/LGHTSG.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LGHTSG/LGHTSG/App/SceneDelegate.swift b/LGHTSG/LGHTSG/App/SceneDelegate.swift index 64e4d8e..67c0d15 100644 --- a/LGHTSG/LGHTSG/App/SceneDelegate.swift +++ b/LGHTSG/LGHTSG/App/SceneDelegate.swift @@ -17,6 +17,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window = UIWindow(windowScene: windowscene) window?.backgroundColor = .systemBackground window?.rootViewController = ViewController() +<<<<<<< Updated upstream +======= + // window?.rootViewController = UINavigationController(rootViewController: MainTabController()) + +>>>>>>> Stashed changes window?.tintColor = .label window?.makeKeyAndVisible() } diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/check/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/check/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/Contents.json new file mode 100644 index 0000000..d72e32c --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "pngegg_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pngegg_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "pngegg_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_1x.png new file mode 100644 index 0000000..f252c92 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_2x.png new file mode 100644 index 0000000..f252c92 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_3x.png new file mode 100644 index 0000000..f252c92 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/check-box.imageset/pngegg_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/Contents.json new file mode 100644 index 0000000..fb2dad7 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "checkbox-unchecked-gray-th_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "checkbox-unchecked-gray-th_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "checkbox-unchecked-gray-th_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_1x.png new file mode 100644 index 0000000..0a3f601 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_2x.png new file mode 100644 index 0000000..0a3f601 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_3x.png new file mode 100644 index 0000000..0a3f601 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/check/not-check-box.imageset/checkbox-unchecked-gray-th_3x.png differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Contents.json" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Contents.json" new file mode 100644 index 0000000..f03d54d --- /dev/null +++ "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Contents.json" @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 157_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 157_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 157_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_1x.png" new file mode 100644 index 0000000..a1b70e9 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_2x.png" new file mode 100644 index 0000000..9235c69 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_3x.png" new file mode 100644 index 0000000..02f488e Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\352\260\234\354\235\270\354\240\225\353\263\264 \354\262\230\353\246\254\353\260\251\354\271\250.imageset/Group 157_3x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Contents.json" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Contents.json" new file mode 100644 index 0000000..3a6e7ab --- /dev/null +++ "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Contents.json" @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 158_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 158_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 158_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_1x.png" new file mode 100644 index 0000000..823c410 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_2x.png" new file mode 100644 index 0000000..7c99096 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_3x.png" new file mode 100644 index 0000000..38d7183 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\353\247\210\354\274\200\355\214\205 \354\240\225\353\263\264.imageset/Group 158_3x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Contents.json" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Contents.json" new file mode 100644 index 0000000..486ee3d --- /dev/null +++ "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Contents.json" @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 156_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 156_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 156_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_1x.png" new file mode 100644 index 0000000..8c197a8 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_2x.png" new file mode 100644 index 0000000..10f88de Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_3x.png" new file mode 100644 index 0000000..5073a2a Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/box/check/\354\204\234\353\271\204\354\212\244 \354\235\264\354\232\251\354\225\275\352\264\200.imageset/Group 156_3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Contents.json new file mode 100644 index 0000000..660abeb --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 143_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 143_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 143_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_1x.png new file mode 100644 index 0000000..5a56471 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_2x.png new file mode 100644 index 0000000..8767a0a Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_3x.png new file mode 100644 index 0000000..c83e90f Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/confirm-code-btn.imageset/Group 143_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Contents.json new file mode 100644 index 0000000..0aecaa1 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 142_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 142_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 142_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_1x.png new file mode 100644 index 0000000..48759db Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_2x.png new file mode 100644 index 0000000..93c13ed Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_3x.png new file mode 100644 index 0000000..349462a Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/send-code-btn.imageset/Group 142_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Contents.json new file mode 100644 index 0000000..12d3fa2 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Rectangle 11_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle 11_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle 11_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_1x.png new file mode 100644 index 0000000..c5f50ed Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_2x.png new file mode 100644 index 0000000..8929245 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_3x.png new file mode 100644 index 0000000..5898fc5 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-box.imageset/Rectangle 11_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Contents.json new file mode 100644 index 0000000..096e019 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Rectangle 172_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle 172_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle 172_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_1x.png new file mode 100644 index 0000000..c7ff48f Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_2x.png new file mode 100644 index 0000000..53d4288 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_3x.png new file mode 100644 index 0000000..7e7f522 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-field.imageset/Rectangle 172_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Contents.json new file mode 100644 index 0000000..2d24123 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Rectangle 12_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle 12_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle 12_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_1x.png new file mode 100644 index 0000000..bd7e41a Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_2x.png new file mode 100644 index 0000000..0963810 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_3x.png new file mode 100644 index 0000000..b83318d Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/box/text-long-box.imageset/Rectangle 12_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_1x.png new file mode 100644 index 0000000..4e9aea9 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_2x.png new file mode 100644 index 0000000..c5294d5 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_3x.png new file mode 100644 index 0000000..15dd4c0 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Btn_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Contents.json new file mode 100644 index 0000000..5d1c97c --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/agree-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Btn_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Btn_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Btn_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Contents.json new file mode 100644 index 0000000..d23edaa --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Rectangle_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_1x.png new file mode 100644 index 0000000..248aadc Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_2x.png new file mode 100644 index 0000000..c02d900 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_3x.png new file mode 100644 index 0000000..7524ae5 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/highlight-btn.imageset/Rectangle_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/Contents.json new file mode 100644 index 0000000..fe21d4b --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "로그아웃_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "로그아웃_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "로그아웃_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_1x.png" new file mode 100644 index 0000000..8e4971c Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_2x.png" new file mode 100644 index 0000000..586535e Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_3x.png" new file mode 100644 index 0000000..4b58c88 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/logout-btn.imageset/\353\241\234\352\267\270\354\225\204\354\233\203_3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/Contents.json new file mode 100644 index 0000000..1d0d803 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "하단 Btn_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "하단 Btn_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "하단 Btn_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_1x.png" new file mode 100644 index 0000000..8387158 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_2x.png" new file mode 100644 index 0000000..7f77eef Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_3x.png" new file mode 100644 index 0000000..8b18776 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/btn/next-btn.imageset/\355\225\230\353\213\250 Btn_3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Contents.json new file mode 100644 index 0000000..be7428e --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Rectangle 25_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle 25_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle 25_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_1x.png new file mode 100644 index 0000000..54ae88e Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_2x.png new file mode 100644 index 0000000..052259c Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_3x.png new file mode 100644 index 0000000..697c0ae Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/btn/success-btn.imageset/Rectangle 25_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/Contents.json new file mode 100644 index 0000000..633edac --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "라고 할때 살걸 (4).png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "라고 할때 살걸 (5).png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "라고 할때 살걸 (6).png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (4).png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (4).png" new file mode 100644 index 0000000..785cc7d Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (4).png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (5).png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (5).png" new file mode 100644 index 0000000..b21190f Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (5).png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (6).png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (6).png" new file mode 100644 index 0000000..4d46ffc Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270 (6).png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/Contents.json new file mode 100644 index 0000000..f748a9b --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "라고 할때 살걸_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "라고 할때 살걸_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "라고 할때 살걸_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_1x.png" new file mode 100644 index 0000000..c231579 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_2x.png" new file mode 100644 index 0000000..44b73a4 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_3x.png" new file mode 100644 index 0000000..10b66f6 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/icon_vertical.imageset/\353\235\274\352\263\240 \355\225\240\353\225\214 \354\202\264\352\261\270_3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Contents.json new file mode 100644 index 0000000..2a091e8 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 105_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 105_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 105_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_1x.png new file mode 100644 index 0000000..bb07341 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_2x.png new file mode 100644 index 0000000..5ee58bd Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_3x.png new file mode 100644 index 0000000..c798d2d Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/iconImage/profile.imageset/Group 105_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/line/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/line/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/line/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Contents.json new file mode 100644 index 0000000..ce4221a --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Line 25_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Line 25_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Line 25_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_1x.png new file mode 100644 index 0000000..e893a38 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_2x.png new file mode 100644 index 0000000..6d269e1 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_3x.png new file mode 100644 index 0000000..58ec2e3 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/line/line.imageset/Line 25_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/login/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/login/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/Contents.json new file mode 100644 index 0000000..f8b33e6 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "kakao_login_large_wide_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "kakao_login_large_wide_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "kakao_login_large_wide_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_1x.png new file mode 100644 index 0000000..4320b2a Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_2x.png new file mode 100644 index 0000000..c3a0251 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_3x.png new file mode 100644 index 0000000..24ef3e6 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/kakaoLogin.imageset/kakao_login_large_wide_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Contents.json new file mode 100644 index 0000000..0351f86 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 130_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 130_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 130_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_1x.png new file mode 100644 index 0000000..25f76bb Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_2x.png new file mode 100644 index 0000000..3f6f864 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_3x.png new file mode 100644 index 0000000..8ca2176 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn.imageset/Group 130_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/Contents.json new file mode 100644 index 0000000..52e46ea --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "로그인 Btn_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "로그인 Btn_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "로그인 Btn_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_1x.png" new file mode 100644 index 0000000..1c83e44 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_2x.png" new file mode 100644 index 0000000..1b529bc Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_3x.png" new file mode 100644 index 0000000..391e5ec Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-btn2.imageset/\353\241\234\352\267\270\354\235\270 Btn_3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/Contents.json new file mode 100644 index 0000000..18837f6 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "간편 로그인 Line _1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "간편 로그인 Line _2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "간편 로그인 Line _3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _1x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _1x.png" new file mode 100644 index 0000000..49cdd3e Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _1x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _2x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _2x.png" new file mode 100644 index 0000000..331c831 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _2x.png" differ diff --git "a/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _3x.png" "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _3x.png" new file mode 100644 index 0000000..3b0cc17 Binary files /dev/null and "b/LGHTSG/LGHTSG/Assets.xcassets/login/login-line.imageset/\352\260\204\355\216\270 \353\241\234\352\267\270\354\235\270 Line _3x.png" differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/mypage/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/mypage/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Contents.json new file mode 100644 index 0000000..1c8c5cf --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 141_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 141_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 141_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_1x.png new file mode 100644 index 0000000..5425d8d Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_2x.png new file mode 100644 index 0000000..54980f8 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_3x.png new file mode 100644 index 0000000..8a89e4a Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage1.imageset/Group 141_3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Contents.json new file mode 100644 index 0000000..f3b838c --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 142__1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 142__2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 142__3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__1x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__1x.png new file mode 100644 index 0000000..3c4d63b Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__2x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__2x.png new file mode 100644 index 0000000..2c951bd Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__3x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__3x.png new file mode 100644 index 0000000..9c18c08 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage2.imageset/Group 142__3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Contents.json new file mode 100644 index 0000000..2a99d61 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 143__1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 143__2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 143__3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__1x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__1x.png new file mode 100644 index 0000000..2d6aeb6 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__2x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__2x.png new file mode 100644 index 0000000..27aecd7 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__3x.png b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__3x.png new file mode 100644 index 0000000..1223b44 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/mypage/mypage3.imageset/Group 143__3x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/navigation/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/navigation/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/navigation/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Contents.json b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Contents.json new file mode 100644 index 0000000..814100a --- /dev/null +++ b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Vector_1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Vector_2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Vector_3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_1x.png b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_1x.png new file mode 100644 index 0000000..57efd7e Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_1x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_2x.png b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_2x.png new file mode 100644 index 0000000..cff7111 Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_2x.png differ diff --git a/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_3x.png b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_3x.png new file mode 100644 index 0000000..3772a3f Binary files /dev/null and b/LGHTSG/LGHTSG/Assets.xcassets/navigation/back-arrow.imageset/Vector_3x.png differ diff --git a/LGHTSG/LGHTSG/Controller/Authentication/FindPasswordController.swift b/LGHTSG/LGHTSG/Controller/Authentication/FindPasswordController.swift new file mode 100644 index 0000000..83c9c58 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/Authentication/FindPasswordController.swift @@ -0,0 +1,56 @@ +import UIKit + +class FindPassWordController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + let FindPwView = FindPwView() + self.view.addSubview(FindPwView) + view.backgroundColor = .black + + + FindPwView.translatesAutoresizingMaskIntoConstraints = false + FindPwView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + FindPwView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + FindPwView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + FindPwView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(FindPwView.navigationBar) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + FindPwView.navigationBar.tintColor = UIColor.white + FindPwView.navigationBar.standardAppearance = navigationAppearance + FindPwView.navigationBar.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + FindPwView.navigationBar.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + FindPwView.navigationBar.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "비밀번호 찾기") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + FindPwView.navigationBar.setItems([navItem], animated: true) + + // MARK: 키보드 올라갔을 때 화면 터치해서 내려가게함 + let tapGesture = UITapGestureRecognizer(target: self.view, action: #selector(self.view.endEditing(_:))) + self.view.addGestureRecognizer(tapGesture) + } + + @objc func tapDismissButton(){ + var userId = UserDefaults.standard.string(forKey: "id") + var pw = UserDefaults.standard.string(forKey: "pw") + + print("id : \(userId), pw : \(pw)") + self.presentingViewController?.dismiss(animated: true) + } + + + + +} diff --git a/LGHTSG/LGHTSG/Controller/Authentication/LoginController.swift b/LGHTSG/LGHTSG/Controller/Authentication/LoginController.swift index d28a364..657532e 100644 --- a/LGHTSG/LGHTSG/Controller/Authentication/LoginController.swift +++ b/LGHTSG/LGHTSG/Controller/Authentication/LoginController.swift @@ -6,13 +6,398 @@ // import UIKit +import SnapKit +import Alamofire + + class LoginController: UIViewController { + +<<<<<<< Updated upstream +======= + + + let titleImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "icon") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let privacyPolicyLabel: UILabel = { + let label = UILabel() + label.text = "개인정보처리방침" + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 13.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let memberInquiryLabel: UILabel = { + let label = UILabel() + label.text = "회원 정보 문의 : admin@rghtsg.com" + label.textColor = .lightGray + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let emailTextField: UITextField = { + let email = UITextField() + email.layer.cornerRadius = 5 + email.leftViewMode = .always + email.attributedPlaceholder = NSAttributedString(string: "이메일", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + email.textColor = .white + email.font = UIFont(name: "NanumSquareR", size: 15.0) + email.borderStyle = .none + email.enablesReturnKeyAutomatically = true + email.translatesAutoresizingMaskIntoConstraints = false + return email + }() + + + let passwordTextField: UITextField = { + let password = UITextField() + password.layer.cornerRadius = 5 + password.leftViewMode = .always + password.attributedPlaceholder = NSAttributedString(string: "비밀번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + password.borderStyle = .none + password.textColor = .white // 글자색을 흰색으로 + password.isSecureTextEntry = true + password.font = UIFont(name: "NanumSquareR", size: 15.0) + password.translatesAutoresizingMaskIntoConstraints = false + return password + }() + + let emailImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let pwImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let loginBtn2: UIButton = { + let btn = UIButton() + btn.setBackgroundImage(UIImage(named: "login-btn2"), for: .normal) + btn.addTarget(self, action: #selector(loginBtnClicked), for: .touchUpInside) + + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let joinBtn2: UIButton = { + let btn = UIButton() + btn.setTitle("회원가입", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let findPwBtn2: UIButton = { + let btn = UIButton() + btn.setTitle("비밀번호 찾기", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let middleLabel2: UILabel = { + let label = UILabel() + label.text = "|" + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textAlignment = .center + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let loginWrongLabel: UILabel = { + let label = UILabel() + label.text = "없는 아이디거나 비밀번호가 틀렸습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let login = LoginApiModel() + let loginMsgCode = LoginApiHeaderModel() + var jwt : String = "" + var msgCode : Int = 0 + var result = LoginResult(jwt: "") + + @objc func loginBtnClicked(){ + + guard let email = emailTextField.text else {return} + guard let password = passwordTextField.text else {return} + + + let bodyData : Parameters = [ + "email" : email, + "password" : password + ] + + login.requestLoginDataModel(bodyData: bodyData){ + data in + self.jwt = data.jwt + print(data) + let vc = MainTabController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + var loginSuccess = UserDefaults.standard.bool(forKey: "loginSuccess") + loginSuccess = UserDefaults.standard.bool(forKey: "loginSuccess") + print(loginSuccess) + + + if jwt == "" { + print("로그인안됨") + loginWrongheight.isActive = false + } + else { + loginWrongheight.isActive = true + + } + + + } + + + // MARK: 로그인 관련 동적라벨 + var loginWrongheight: NSLayoutConstraint! + + + func setAutoLayout(){ + loginWrongheight = loginWrongLabel.heightAnchor.constraint(equalToConstant: 0) + loginWrongheight.isActive = true + + view.addSubview(titleImageView2) + + view.addSubview(emailImageView) + view.addSubview(emailTextField) + + view.addSubview(pwImageView) + view.addSubview(passwordTextField) + view.addSubview(loginWrongLabel) + + view.addSubview(loginBtn2) + view.addSubview(joinBtn2) + view.addSubview(middleLabel2) + view.addSubview(findPwBtn2) + + + view.addSubview(privacyPolicyLabel) + view.addSubview(memberInquiryLabel) + + + // MARK: 맨 위 이미지 위치 + self.titleImageView2.snp.makeConstraints { + $0.top.equalToSuperview().offset(170) + $0.centerX.equalToSuperview() + } + + self.emailImageView.snp.makeConstraints { + $0.top.equalTo(titleImageView2.snp.bottom).offset(100) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + self.emailTextField.snp.makeConstraints { + $0.top.equalTo(titleImageView2.snp.bottom).offset(115) + $0.left.equalToSuperview().offset(50) + $0.right.equalToSuperview().offset(-30) + } + + + + // MARK: 비밀번호 위치 및 배경 + // 나중에 에러 메세지 위치랑 고려해서 바꿔야함 + self.pwImageView.snp.makeConstraints { + $0.top.equalTo(emailImageView.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + self.passwordTextField.snp.makeConstraints { + $0.top.equalTo(emailImageView.snp.bottom).offset(35) + $0.left.equalToSuperview().offset(50) + $0.right.equalToSuperview().offset(-30) + } + + self.loginWrongLabel.snp.makeConstraints{ + $0.top.equalTo(pwImageView.snp.bottom).offset(5) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + // MARK: 로그인 버튼 + self.loginBtn2.snp.makeConstraints { + $0.top.equalTo(pwImageView.snp.bottom).offset(40) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + // MARK: 회원가입 및 비밀번호 찾기 + self.middleLabel2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(25) + $0.centerX.equalTo(loginBtn2) + } + + self.joinBtn2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(20) + $0.right.equalTo(middleLabel2.snp.left).offset(-20) + } + + + self.findPwBtn2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(20) + $0.left.equalTo(middleLabel2.snp.right).offset(20) + } + + + // MARK: 맨 밑 글자 위치 + self.memberInquiryLabel.snp.makeConstraints{ + $0.centerX.equalToSuperview() + $0.top.equalTo(privacyPolicyLabel.snp.bottom).offset(5) + } + + self.privacyPolicyLabel.snp.makeConstraints{ + $0.centerX.equalToSuperview() + $0.bottom.equalToSuperview().offset(-100) + + } + } + +>>>>>>> Stashed changes override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + view.backgroundColor = .black +<<<<<<< Updated upstream + + // MARK: 뷰 설정하기 + let LoginView = LoginView() + self.view.addSubview(LoginView) + + LoginView.translatesAutoresizingMaskIntoConstraints = false + LoginView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + LoginView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + LoginView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + LoginView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + +======= + setAutoLayout() + +>>>>>>> Stashed changes + // MARK: 옆으로 넘기면 뒤로 갈 수 있게 + let swipeleft = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(infoviewSwipeLeft)) + swipeleft.edges = .left + swipeleft.delegate = self + self.view.addGestureRecognizer(swipeleft) +<<<<<<< Updated upstream + + + + // MARK: 화면 이동을 위한 addTarget + LoginView.findPwBtn2.addTarget(self, action: #selector(findPwClicked), for: .touchUpInside) + LoginView.joinBtn2.addTarget(self, action: #selector(joinBtnClicked), for: .touchUpInside) +======= + + + // MARK: 화면 이동을 위한 addTarget + findPwBtn2.addTarget(self, action: #selector(findPwClicked), for: .touchUpInside) + joinBtn2.addTarget(self, action: #selector(joinBtnClicked), for: .touchUpInside) +>>>>>>> Stashed changes + + // MARK: 키보드 올라갔을 때 화면 터치해서 내려가게함 + let tapGesture = UITapGestureRecognizer(target: self.view, action: #selector(self.view.endEditing(_:))) + tapGesture.delegate = self + self.view.addGestureRecognizer(tapGesture) + + + // MARK: 키보드가 화면을 가릴 때 화면을 위로 올릴 수 있도록 + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(sender:)), name: UIResponder.keyboardWillShowNotification, object: nil); + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(sender:)), name: UIResponder.keyboardWillHideNotification, object: nil); +<<<<<<< Updated upstream + } + + @objc func infoviewSwipeLeft(){ + self.presentingViewController?.dismiss(animated: true) + } + + @objc func findPwClicked(){ + let vc = FindPassWordController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func joinBtnClicked(){ + let vc = CheckAgreeController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + // 키보드때문에 화면이 가려질 경우 화면을 올린다 + @objc func keyboardWillShow(sender: NSNotification) { + self.view.frame.origin.y = -100 // Move view 150 points upward } + @objc func keyboardWillHide(sender: NSNotification) { + print("키보드 내려감") +======= + } + + @objc func infoviewSwipeLeft(){ + self.presentingViewController?.dismiss(animated: true) + } + + @objc func findPwClicked(){ + let vc = FindPassWordController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func joinBtnClicked(){ + let vc = CheckAgreeController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + // 키보드때문에 화면이 가려질 경우 화면을 올린다 + @objc func keyboardWillShow(sender: NSNotification) { + self.view.frame.origin.y = -100 // Move view 150 points upward + } + + @objc func keyboardWillHide(sender: NSNotification) { +>>>>>>> Stashed changes + self.view.frame.origin.y = 0 // Move view to original position + } +} + + +// 제스처 여러개 인식될 수 있도록 +extension LoginController: UIGestureRecognizerDelegate { + + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { + return true + } + } diff --git a/LGHTSG/LGHTSG/Controller/Authentication/MyPageViewController.swift b/LGHTSG/LGHTSG/Controller/Authentication/MyPageViewController.swift new file mode 100644 index 0000000..c84e9dc --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/Authentication/MyPageViewController.swift @@ -0,0 +1,57 @@ +// +// MyPageViewController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/02/01. +// + +import UIKit + +class MyPageViewController: UIViewController { + + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + } + + override func viewDidLoad() { + super.viewDidLoad() + + let MyPageView = MyPageView() + self.view.addSubview(MyPageView) + view.backgroundColor = .black + + + MyPageView.translatesAutoresizingMaskIntoConstraints = false + MyPageView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + MyPageView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + MyPageView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + MyPageView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(MyPageView.navigationBar7) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + MyPageView.navigationBar7.tintColor = UIColor.white + MyPageView.navigationBar7.standardAppearance = navigationAppearance + MyPageView.navigationBar7.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + MyPageView.navigationBar7.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + MyPageView.navigationBar7.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + + let navItem = UINavigationItem(title: "마이페이지") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + MyPageView.navigationBar7.setItems([navItem], animated: true) + } + + +} + + diff --git a/LGHTSG/LGHTSG/Controller/Authentication/RegisterationController.swift b/LGHTSG/LGHTSG/Controller/Authentication/RegisterationController.swift index fd143e3..82c04db 100644 --- a/LGHTSG/LGHTSG/Controller/Authentication/RegisterationController.swift +++ b/LGHTSG/LGHTSG/Controller/Authentication/RegisterationController.swift @@ -6,13 +6,231 @@ // import UIKit +import Alamofire class RegisterationController: UIViewController { + + + var profileImageView : UIImageView = { + let image = UIImageView() + image.layer.cornerRadius = image.frame.height/2 + image.layer.borderWidth = 1 + image.layer.masksToBounds = true + image.contentMode = .scaleToFill + image.layer.borderColor = UIColor.clear.cgColor // 원형 이미지의 테두리 제거 + image.clipsToBounds = true + image.image = UIImage(named: "profile") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + // MARK: imagePicker + var profileImagePicker = UIImagePickerController() + + + // MARK: https://mansu.tistory.com/120 override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + let RegisterView = RegisterView() + + view.backgroundColor = .black + view.addSubview(profileImageView) + view.addSubview(RegisterView) + + let tap = UITapGestureRecognizer(target: self, action: #selector(changeProfile)) + profileImageView.addGestureRecognizer(tap) + profileImageView.isUserInteractionEnabled = true + + + + // MARK: profile 위치 설정 + self.profileImageView.snp.makeConstraints{ + $0.top.equalToSuperview().offset(120) + $0.centerX.equalToSuperview() + } + + profileImageView.snp.makeConstraints { make in + make.height.equalTo(100) + make.width.equalTo(100) + } + + RegisterView.translatesAutoresizingMaskIntoConstraints = false + RegisterView.topAnchor.constraint(equalTo: profileImageView.bottomAnchor).isActive = true + RegisterView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + RegisterView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + RegisterView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 키보드 올라갔을 때 화면 터치해서 내려가게함 + let tapGesture = UITapGestureRecognizer(target: self.view, action: #selector(self.view.endEditing(_:))) + self.view.addGestureRecognizer(tapGesture) + // MARK: 키보드가 화면을 가릴 때 화면을 위로 올릴 수 있도록 + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(sender:)), name: UIResponder.keyboardWillShowNotification, object: nil); + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(sender:)), name: UIResponder.keyboardWillHideNotification, object: nil); + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(RegisterView.navigationBar2) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + RegisterView.navigationBar2.tintColor = UIColor.white + RegisterView.navigationBar2.standardAppearance = navigationAppearance + RegisterView.navigationBar2.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + RegisterView.navigationBar2.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + RegisterView.navigationBar2.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "회원가입") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + RegisterView.navigationBar2.setItems([navItem], animated: true) + + + // MARK: 화면 전환이나 실행함수 +<<<<<<< Updated upstream + RegisterView.nextBtn.addTarget(self, action: #selector(nextBtnClicked), for: .touchUpInside) +======= + RegisterView.nextBtn.addTarget(self, action: #selector(joinBtnClicked2), for: .touchUpInside) + } + + + + let joinAccess = JoinApiModel() + var userIndex : Int! + + @objc func joinBtnClicked2(){ + + let RegisterView = RegisterView() + + var confirmCheck = UserDefaults.standard.bool(forKey: "ConfirmSuccess") ?? false + var samePw = UserDefaults.standard.bool(forKey: "samePw") ?? false + var validPw = UserDefaults.standard.bool(forKey: "validPw") ?? false + + + print(confirmCheck) + print(samePw) + print(validPw) + + if confirmCheck == true && samePw == true && validPw == true { + print("회원가입 가능!") + let userName = RegisterView.nameTextField.text + let email = RegisterView.emailTextField3.text + let password = RegisterView.passwordTextField3.text + let emailCheck = "1" + let profileImg = "urlurl" + + let bodyData : Parameters = [ + "userName" : userName, + "email" : email, + "password" : password, + "emailCheck" : emailCheck, + "profileImg" : profileImg + ] + + joinAccess.requestJoinDataModel(bodyData: bodyData){ + data in + print(data.body) + } + self.present(RegisterationSuccessController(), animated: true) + } + else{ + print("회원가입 불가능") + } +>>>>>>> Stashed changes + } + + + + @objc func nextBtnClicked(){ + let success = UserDefaults.standard.bool(forKey: "success") + if success == true { +<<<<<<< Updated upstream +======= + print("회원가입완료") +>>>>>>> Stashed changes + self.present(RegisterationSuccessController(), animated: true) + UserDefaults.standard.removeObject(forKey: "success") + } + else { + print("아직 회원가입 안됨") + } + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + UserDefaults.standard.removeObject(forKey: "allcheck") + UserDefaults.standard.removeObject(forKey: "check1") + UserDefaults.standard.removeObject(forKey: "check2") + UserDefaults.standard.removeObject(forKey: "check3") + + } + + + // 키보드때문에 화면이 가려질 경우 화면을 올린다 + @objc func keyboardWillShow(sender: NSNotification) { + self.view.frame.origin.y = -180 // Move view 150 points upward + } + + @objc func keyboardWillHide(sender: NSNotification) { + self.view.frame.origin.y = 0 // Move view to original position + } + + + // MARK: 프로필 설정 + @objc func changeProfile(){ + profileImagePicker.sourceType = .photoLibrary + profileImagePicker.allowsEditing = false + profileImagePicker.delegate = self + present(profileImagePicker, animated: true) + } + + + func tapImage(imageView: UIImageView){ + var tap = UITapGestureRecognizer() + if imageView == profileImageView { + print("프로필 설정") + tap = UITapGestureRecognizer(target: self, action: #selector(changeProfile)) + } + imageView.addGestureRecognizer(tap) + imageView.isUserInteractionEnabled = true + } + +} + + +extension RegisterationController: UIImagePickerControllerDelegate, UINavigationControllerDelegate{ + + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { + + if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage { + self.profileImageView.image = image + self.profileImageView.layer.cornerRadius = profileImageView.frame.height/2 + self.profileImageView.contentMode = .scaleToFill + self.profileImageView.clipsToBounds = true +<<<<<<< Updated upstream + self.profileImageView.layer.borderColor = UIColor.clear.cgColor // 원형 이미지의 테두리 제거 +======= + self.profileImageView.layer.borderColor = UIColor.black.cgColor // 원형 이미지의 테두리 제거 + + /* + // 고유한 이미지 이름을 위해 타임스템프 값을 활용 + let timestamp: Int = icuDateToSeconds(getNow()) + // 사용자이름_타임스템프.jpg 형식으로 파일이름 지정 + let imageFileName: String = userName + "_" + String(timestamp) + ".jpg" + // 이미지가 저장될 경로 + let imageFilePath: String = imageDirectory.path + imageFileName + */ +>>>>>>> Stashed changes + } + dismiss(animated: true, completion: nil) + + } } diff --git a/LGHTSG/LGHTSG/Controller/Authentication/RegisterationSuccessController.swift b/LGHTSG/LGHTSG/Controller/Authentication/RegisterationSuccessController.swift new file mode 100644 index 0000000..ab4e2bf --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/Authentication/RegisterationSuccessController.swift @@ -0,0 +1,27 @@ +// +// RegisterationSuccessController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/28. +// + +import UIKit + +class RegisterationSuccessController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + let JoinSuccessView = JoinSuccessView() + + view.addSubview(JoinSuccessView) + JoinSuccessView.translatesAutoresizingMaskIntoConstraints = false + JoinSuccessView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + JoinSuccessView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + JoinSuccessView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + JoinSuccessView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + } + + +} diff --git a/LGHTSG/LGHTSG/Controller/ChartViewController.swift b/LGHTSG/LGHTSG/Controller/ChartViewController.swift new file mode 100644 index 0000000..ba87b7b --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/ChartViewController.swift @@ -0,0 +1,368 @@ +// +// ChartViewController.swift +// LGHTSG +// +// Created by SunHo Lee on 2023/01/22. +// +import UIKit +import Charts +import Kingfisher +import SnapKit +import Foundation + +class ChartViewController : UIViewController { + var stockPriceData = StockPriceModel() + var EstatePriceData = EstatePriceModel() + var nameText : String? + var PriceText : String? + var idx : Int? + + var pricePercentText : String? + var changeDateText : String? + var imageURL : String? + var priceListDatas = [Int]() + var timeListDatas = [String]() + let contentView = UIView() + private let contentScrollView : UIScrollView = { + let scrollview = UIScrollView() + scrollview.backgroundColor = .black + scrollview.translatesAutoresizingMaskIntoConstraints = false + return scrollview + }() + lazy var lineChartView : LineChartView = { + let chartView = LineChartView() + return chartView + }() + private lazy var nameLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 16, weight: .semibold) + label.text = nameText + return label + }() + private lazy var priceLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 14, weight: .medium) + label.textColor = UIColor.systemGray + label.text = PriceText + return label + }() + private lazy var pricePercent : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight: .medium) + label.textColor = UIColor.red + label.text = pricePercentText + return label + }() + private lazy var changeDate : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight : .medium) + label.textColor = UIColor.systemGray + label.text = changeDateText + return label + }() + //MARK: - Label + private lazy var dealLabel: UILabel = { + let label = UILabel() + label.text = "거래 이력" + label.font = UIFont.systemFont(ofSize: 12, weight: .light) + label.textColor = .white + return label + }() + + private lazy var revenueLabel: UILabel = { + let label = UILabel() + label.text = "구매 시점에 비해 얼마 올랐어요" + label.textColor = .white + label.font = UIFont.systemFont(ofSize: 16, weight: .bold) + return label + }() + private lazy var imageView : UIImageView = { + let imgview = UIImageView() + if let imageURL = imageURL{ + let url = URL(string: imageURL) + imgview.kf.setImage(with: url) + } + return imgview + }() + + private var lineImage = UnderlineView() + + + //MARK: - SegmentControl + private lazy var segmentCtrl: UISegmentedControl = { + let items = ["일","월", "1년", "3년"] + let seg = UISegmentedControl(items: items) + seg.addTarget(self, action: #selector(indexChanged(_:)), for: .valueChanged) + seg.layer.cornerRadius = 0.7 + seg.backgroundColor = UIColor(named: "dropdown") + seg.tintColor = .lightGray + seg.setTitleTextAttributes( + [ + NSAttributedString.Key.foregroundColor: UIColor.white, + .font: UIFont.systemFont(ofSize: 14, weight: .semibold) + ], + for: .selected + ) + seg.setTitleTextAttributes( + [ + NSAttributedString.Key.foregroundColor: UIColor.systemGray, + .font: UIFont.systemFont(ofSize: 14, weight: .semibold) + ], + for: .normal + ) + seg.selectedSegmentIndex = 1 + return seg + }() + + //MARK: - Button + private lazy var sellButton: UIButton = { + let btn = UIButton() + btn.setTitle("판매", for: .normal) + btn.setTitleColor(.blue, for: .normal) + btn.backgroundColor = .white + btn.layer.cornerRadius = 5 + btn.layer.borderWidth = 1 + return btn + + }() + + //MARK: - TableView + private lazy var tableView: UITableView = { + let table = UITableView() + table.backgroundColor = .clear + return table + + }() + + //MARK: - LifeCycle + override func viewDidLoad() { + super.viewDidLoad() + + setLineChartView() + configure() + + } + //MARK: - TableViewSetting + func setupTableView(){ + contentView.addSubview(tableView) + tableView.delegate = self + tableView.dataSource = self + tableView.register(EstateDetailCell.self, forCellReuseIdentifier: EstateDetailCell.identifier) + tableView.separatorStyle = .none + tableView.snp.makeConstraints{ + $0.top.equalTo(lineImage.snp.bottom) + $0.height.equalTo(120) + $0.leading.equalToSuperview().inset(33) + $0.trailing.equalToSuperview().inset(33) + $0.bottom.equalTo(sellButton.snp.top ).offset(-10) + + } + } + @objc func indexChanged(_ sender: UISegmentedControl){ + switch sender.selectedSegmentIndex{ + case 0: + + let daypricedata : [Int] = priceListDatas.suffix(30) + let daytimeListDatas : [String] = timeListDatas.suffix(30) + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: daypricedata), xAxis: daytimeListDatas, recentPrice : Double(daypricedata.last!)) + tableView.reloadData() + case 1: + let monthpricedata : [Int] = priceListDatas.suffix(90) + let monthtimeListDatas : [String] = timeListDatas.suffix(90) + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: monthpricedata), xAxis: monthtimeListDatas, recentPrice : Double(monthpricedata.last!)) + tableView.reloadData() + case 2: +// let keydate = Calendar(identifier: .gregorian).date(byAdding: , to: <#T##Date#>) + print("3년") + case 3: + print("5년") + default: + break + } + } +} +extension ChartViewController : UITableViewDelegate, UITableViewDataSource { + //cell 높이조절 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 30 + } + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return timeListDatas.count } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell(withIdentifier: EstateDetailCell.identifier, for: indexPath) as? EstateDetailCell else { return UITableViewCell() } + + cell.date.text = timeListDatas[indexPath.row] + cell.date.textColor = .white + cell.price.text = "\(priceListDatas[indexPath.row])원" + cell.price.textColor = .white + cell.buysell.text = "hello" + cell.buysell.textColor = .white + return cell + } +} +extension ChartViewController { + func setLineData(lineChartView: LineChartView, lineChartDataEntries: [ChartDataEntry], xAxis : [String], recentPrice : Double) { + // Entry들을 이용해 Data Set 만들기(그런데 우리는 각 포인트를 나타내줄 필요가 없어서 지워줌 + let lineChartdataSet = LineChartDataSet(entries: lineChartDataEntries, label: "주가") + lineChartdataSet.drawValuesEnabled = false + lineChartdataSet.drawCirclesEnabled = false + lineChartdataSet.colors = [.blue] + //선택했을때 라인 지워주기 + lineChartdataSet.drawHorizontalHighlightIndicatorEnabled = false +// lineChartdataSet.drawVerticalHighlightIndicatorEnabled = false + lineChartdataSet.highlightColor = .white + + // DataSet을 차트 데이터로 넣기 + let lineChartData = LineChartData(dataSet: lineChartdataSet) + // 데이터 출력 + lineChartView.data = lineChartData + // 선제거 + lineChartView.leftAxis.drawGridLinesEnabled = false + lineChartView.rightAxis.drawGridLinesEnabled = false + lineChartView.leftAxis.enabled = false // 왼쪽 label 값 지워주기 + lineChartView.rightAxis.enabled = false // right + lineChartView.xAxis.enabled = false // 위쪽 label + lineChartView.xAxis.drawGridLinesEnabled = false + lineChartView.xAxis.drawAxisLineEnabled = false + lineChartView.doubleTapToZoomEnabled = false + // 아래 뜨는 어떤항목인지 알려주는 label 제거 + lineChartView.legend.enabled = false + lineChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: xAxis) + + let marker = ChartMarker(pricedate: xAxis, recentprice: recentPrice) + marker.chartView = lineChartView + marker.chartx = contentView.frame.width - 10 + lineChartView.marker = marker + lineChartView.drawMarkers = true + // 데이터 소수점 제거 + let formatter = NumberFormatter() + formatter.minimumFractionDigits = 0 + lineChartView.data?.setValueFormatter(DefaultValueFormatter(formatter:formatter)) + } + // entry 만들기 + func entryData(yvalues: [Int]) -> [ChartDataEntry] { + // entry 담을 array + var lineDataEntries: [ChartDataEntry] = [] + // 담기 + for i in 0 ..< yvalues.count { + let lineDataEntry = ChartDataEntry(x: Double(i), y: Double(yvalues[i])) + lineDataEntries.append(lineDataEntry) + } + // 반환 + return lineDataEntries + } + private func setLineChartView() { + stockPriceData.requestResellPrice(resellIdx: self.idx!, onCompleted: { (pricelists, transctiontime) in + DispatchQueue.main.async { + self.priceListDatas = pricelists + self.timeListDatas = transctiontime + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: pricelists), xAxis: transctiontime, recentPrice : Double(pricelists.last!)) + + self.chartUI() + self.setupTableView() + + } + }) + + } + +// EstatePriceData.requestStockPrice(EstateIdx: self.idx!, onCompleted: { (pricelists, transctiontime) in +// DispatchQueue.main.async { +// self.view.addSubview(self.lineChartView) +// self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: pricelists), xAxis: transctiontime, recentPrice : Double(pricelists.last!)) +//// self.lineChartView.snp.makeConstraints{ +//// $0.leading.trailing.equalToSuperview() +//// $0.top.bottom.equalToSuperview().inset(140) +//// } +// } +// }) + + } + + +extension ChartViewController { + //MARK: - Configure + private func chartUI(){ + [lineChartView, imageView,lineImage,dealLabel, revenueLabel, segmentCtrl].forEach{contentView.addSubview($0)} + lineChartView.snp.makeConstraints{ + $0.top.equalTo(priceLabel.snp.bottom).offset(20) +// $0.width.equalTo(contentView.snp.width) + $0.leading.trailing.equalTo(contentView ).inset(15) + $0.height.equalTo(270) +// $0.bottom.equalTo(segmentCtrl.snp.top).inset(8) + } + + segmentCtrl.snp.makeConstraints{ + $0.top.equalTo(lineChartView.snp.bottom) + $0.leading.equalTo(contentView.snp.leading).offset(15) + $0.trailing.equalTo(contentView.snp.trailing).offset(-15) + } + imageView.snp.makeConstraints{ + $0.top.equalTo(segmentCtrl.snp.bottom).offset(10) + if imageURL != nil { + $0.width.height.equalTo(300) + }else{ + $0.width.height.equalTo(0) + } + $0.centerX.equalToSuperview() + } + revenueLabel.snp.makeConstraints{ + $0.leading.equalToSuperview().inset(33) + $0.top.equalTo(imageView.snp.bottom).offset(10) + } + + dealLabel.snp.makeConstraints{ + $0.top.equalTo(revenueLabel.snp.bottom).offset(10) + $0.leading.equalToSuperview().inset(33) + } + lineImage.snp.makeConstraints{ + $0.leading.equalToSuperview().inset(33) + $0.trailing.equalToSuperview().inset(33) + $0.height.equalTo(1) + $0.top.equalTo(dealLabel.snp.bottom).offset(4) + } + + + } + private func configure(){ + lineImage.backgroundColor = .label + self.view.addSubview(contentScrollView) + // 스크롤뷰 세로로 + contentScrollView.addSubview(contentView) + [ nameLabel, priceLabel, pricePercent,changeDate, sellButton] + .forEach {contentView.addSubview($0)} + contentScrollView.snp.makeConstraints{ + $0.top.leading.trailing.bottom.equalTo(view.safeAreaLayoutGuide ) + } + contentView.snp.makeConstraints{ + $0.top.leading.trailing.bottom.equalTo(contentScrollView.contentLayoutGuide) + $0.width.equalTo(contentScrollView.frameLayoutGuide) + } + + nameLabel.snp.makeConstraints{ + $0.top.equalTo(contentView).offset(10) + $0.leading.equalTo(contentView.snp.leading).inset(15) + + } + priceLabel.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(8) + $0.leading.equalTo(nameLabel.snp.leading) + } + pricePercent.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(9) + $0.leading.equalTo(priceLabel.snp.trailing).offset(8) + } + changeDate.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(10) + $0.leading.equalTo(pricePercent.snp.trailing).offset(8) + } + + sellButton.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.height.equalTo(48) + $0.width.equalToSuperview().inset(20) + $0.centerX.equalToSuperview() + } + } +} diff --git a/LGHTSG/LGHTSG/Controller/CheckController/CheckAgreeController.swift b/LGHTSG/LGHTSG/Controller/CheckController/CheckAgreeController.swift new file mode 100644 index 0000000..17da51f --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/CheckController/CheckAgreeController.swift @@ -0,0 +1,104 @@ +// +// CheckAgreeController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import UIKit + +class CheckAgreeController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + let CheckAgreeView = CheckAgreeView() + view.addSubview(CheckAgreeView) + + UserDefaults.standard.set(false, forKey: "allcheck") + UserDefaults.standard.set(false, forKey: "check1") + UserDefaults.standard.set(false, forKey: "check2") + UserDefaults.standard.set(false, forKey: "check3") + + CheckAgreeView.translatesAutoresizingMaskIntoConstraints = false + CheckAgreeView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckAgreeView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + CheckAgreeView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + CheckAgreeView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(CheckAgreeView.navigationBar3) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + CheckAgreeView.navigationBar3.tintColor = UIColor.white + CheckAgreeView.navigationBar3.standardAppearance = navigationAppearance + CheckAgreeView.navigationBar3.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckAgreeView.navigationBar3.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + CheckAgreeView.navigationBar3.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "회원가입") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + CheckAgreeView.navigationBar3.setItems([navItem], animated: true) + CheckAgreeView.agreeBtn1.addTarget(self, action: #selector(agreeBtn1Clicked), for: .touchUpInside) + CheckAgreeView.agreeBtn2.addTarget(self, action: #selector(agreeBtn2Clicked), for: .touchUpInside) + CheckAgreeView.agreeBtn3.addTarget(self, action: #selector(agreeBtn3Clicked), for: .touchUpInside) + CheckAgreeView.nextBtn2.addTarget(self, action: #selector(nextBtnClicked2), for: .touchUpInside) + + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + } + + @objc func agreeBtn1Clicked(){ + self.present(CheckPageServiceController(), animated: true) + } + + @objc func agreeBtn2Clicked(){ + self.present(CheckPagePrivacyController(), animated: true) + } + + @objc func agreeBtn3Clicked(){ + self.present(CheckPageMarketingController(), animated: true) + } + + @objc func nextBtnClicked2(){ + + // MARK: 체크여부 돌아오는지 + var allCheck : String = "" + allCheck = UserDefaults.standard.string(forKey: "allcheck") ?? "0" + var isChecked2 : String = "" + isChecked2 = UserDefaults.standard.string(forKey: "check1") ?? "0" + var isChecked3 : String = "" + isChecked3 = UserDefaults.standard.string(forKey: "check2") ?? "0" + var isChecked4 : String = "" + isChecked4 = UserDefaults.standard.string(forKey: "check3") ?? "0" + + print("allCheck:\(allCheck), isChecked2:\(isChecked2), isChecked3:\(isChecked3), isChecked4:\(isChecked4)") + + var allChecked = Int(allCheck) + var isCheck2 = Int(isChecked2) + var isCheck3 = Int(isChecked3) + var isCheck4 = Int(isChecked4) + + if allChecked == 1{ + self.present(RegisterationController(), animated: true) + } + else if isCheck2 == 1 && isCheck3 == 1 && isCheck4 == 1{ + self.present(RegisterationController(), animated: true) + } + else{ + print("체크안된게 있음") + } + + + } + +} diff --git a/LGHTSG/LGHTSG/Controller/CheckController/CheckPageMarketingController.swift b/LGHTSG/LGHTSG/Controller/CheckController/CheckPageMarketingController.swift new file mode 100644 index 0000000..5e46019 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/CheckController/CheckPageMarketingController.swift @@ -0,0 +1,52 @@ +// +// CheckPageMarketingController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import UIKit + +class CheckPageMarketingController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + let CheckPageMarketingView = CheckPageMarketingView() + view.backgroundColor = .black + view.addSubview(CheckPageMarketingView) + + CheckPageMarketingView.translatesAutoresizingMaskIntoConstraints = false + CheckPageMarketingView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPageMarketingView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + CheckPageMarketingView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + CheckPageMarketingView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(CheckPageMarketingView.navigationBar6) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + CheckPageMarketingView.navigationBar6.tintColor = UIColor.white + CheckPageMarketingView.navigationBar6.standardAppearance = navigationAppearance + CheckPageMarketingView.navigationBar6.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPageMarketingView.navigationBar6.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + CheckPageMarketingView.navigationBar6.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "마케팅 정보 수신 동의") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + CheckPageMarketingView.navigationBar6.setItems([navItem], animated: true) + CheckPageMarketingView.nextLabel5.addTarget(self, action: #selector(tapDismissButton), for: .touchUpInside) + + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + } + +} diff --git a/LGHTSG/LGHTSG/Controller/CheckController/CheckPagePrivacyController.swift b/LGHTSG/LGHTSG/Controller/CheckController/CheckPagePrivacyController.swift new file mode 100644 index 0000000..b8b9a31 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/CheckController/CheckPagePrivacyController.swift @@ -0,0 +1,53 @@ +// +// CheckPagePrivacyController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import UIKit + +class CheckPagePrivacyController: UIViewController { + + override func viewDidLoad() { + + super.viewDidLoad() + let CheckPagePrivacyView = CheckPagePrivacyView() + view.backgroundColor = .black + view.addSubview(CheckPagePrivacyView) + + CheckPagePrivacyView.translatesAutoresizingMaskIntoConstraints = false + CheckPagePrivacyView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPagePrivacyView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + CheckPagePrivacyView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + CheckPagePrivacyView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(CheckPagePrivacyView.navigationBar5) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + CheckPagePrivacyView.navigationBar5.tintColor = UIColor.white + CheckPagePrivacyView.navigationBar5.standardAppearance = navigationAppearance + CheckPagePrivacyView.navigationBar5.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPagePrivacyView.navigationBar5.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + CheckPagePrivacyView.navigationBar5.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "개인정보 처리방침") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + CheckPagePrivacyView.navigationBar5.setItems([navItem], animated: true) + CheckPagePrivacyView.nextLabel4.addTarget(self, action: #selector(tapDismissButton), for: .touchUpInside) + + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + } + + +} diff --git a/LGHTSG/LGHTSG/Controller/CheckController/CheckPageServiceController.swift b/LGHTSG/LGHTSG/Controller/CheckController/CheckPageServiceController.swift new file mode 100644 index 0000000..e626d81 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/CheckController/CheckPageServiceController.swift @@ -0,0 +1,54 @@ +// +// CheckPageServiceController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import UIKit + +class CheckPageServiceController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + let CheckPageServiceView = CheckPageServiceView() + view.backgroundColor = .black + view.addSubview(CheckPageServiceView) + + CheckPageServiceView.translatesAutoresizingMaskIntoConstraints = false + CheckPageServiceView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPageServiceView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + CheckPageServiceView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + CheckPageServiceView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(CheckPageServiceView.navigationBar4) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + CheckPageServiceView.navigationBar4.tintColor = UIColor.white + CheckPageServiceView.navigationBar4.standardAppearance = navigationAppearance + CheckPageServiceView.navigationBar4.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + CheckPageServiceView.navigationBar4.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + CheckPageServiceView.navigationBar4.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "서비스 이용약관") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + CheckPageServiceView.navigationBar4.setItems([navItem], animated: true) + CheckPageServiceView.nextLabel3.addTarget(self, action: #selector(tapDismissButton), for: .touchUpInside) + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + } + + + +} diff --git a/LGHTSG/LGHTSG/Controller/ExploreViewController.swift b/LGHTSG/LGHTSG/Controller/ExploreViewController.swift new file mode 100644 index 0000000..3b50f09 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/ExploreViewController.swift @@ -0,0 +1,244 @@ +// +// ExploreViewController.swift +// LGHTSG +// +// Created by SunHo Lee on 2023/01/11. +// + +import UIKit +import SnapKit +protocol searchDataFilterDelegate{ + func searchData(data : String) +} +class ExploreViewController : UIViewController { + var delegate1 : searchDataFilterDelegate? + var segmentControl = UnderlineSegmentedControl(items: ["Top", "부동산", "주식", "리셀"]) + let underline1 = UnderlineView() + let underline2 = UnderlineView() + let underline3 = UnderlineView() + let underline4 = UnderlineView() + var resellVC = resellView() + static var isSearching = false + let stockView = StockView() + let TopView = TopViewController() + let EstateVC = EstateController() +// private lazy var reSellView : resellView = { +// let view = resellView(coder: NSCoder) +// return view +// }() + override func viewDidLoad() { + super.viewDidLoad() +// reSellView.delegate = self + stockView.delegate = self + SetNavigationBar() + setTobTabbar() + self.addChild(TopView) + self.view.addSubview(TopView.view) + TopView.view.snp.makeConstraints{ + $0.leading.trailing.equalToSuperview().inset(23) + $0.top.equalTo(underline4.snp.bottom).offset(32) + $0.bottom.equalTo(view.safeAreaLayoutGuide) + } + + } + func setTobTabbar(){ + view.addSubview(segmentControl) + view.addSubview(underline1) + view.addSubview(underline2) + view.addSubview(underline3) + view.addSubview(underline4) + segmentControl.addTarget(self, action: #selector(clickfoursegment), for: .valueChanged) + segmentControl.snp.makeConstraints{ + $0.top.equalTo(view.safeAreaLayoutGuide.snp.top) + $0.leading.trailing.equalToSuperview().inset(16) + $0.height.equalTo(48) + } + underline1.backgroundColor = .white + underline1.snp.makeConstraints{ + $0.leading.equalToSuperview().inset(18) + $0.height.equalTo(1) + $0.width.equalTo((view.frame.width - 36 - 12.5) / 4) + $0.top.equalTo(segmentControl.snp.bottom).offset(-8) + } + underline2.snp.makeConstraints{ + $0.leading.equalTo(underline1.snp.trailing).offset(4.5) + $0.height.equalTo(1) + $0.width.equalTo((view.frame.width - 36 - 12.5) / 4) + $0.top.equalTo(segmentControl.snp.bottom).offset(-8) + } + underline3.snp.makeConstraints{ + $0.leading.equalTo(underline2.snp.trailing).offset(3.5) + $0.height.equalTo(1) + $0.width.equalTo((view.frame.width - 36 - 12.5) / 4) + $0.top.equalTo(segmentControl.snp.bottom).offset(-8) + } + underline4.snp.makeConstraints{ + $0.leading.equalTo(underline3.snp.trailing).offset(4.5) + $0.height.equalTo(1) + $0.width.equalTo((view.frame.width - 36 - 12.5) / 4) + $0.top.equalTo(segmentControl.snp.bottom).offset(-8) + } + } + @objc func clickfoursegment(_ sender : UISegmentedControl){ + switch sender.selectedSegmentIndex { + case 0: + stockView.removeFromParent() + stockView.view.removeFromSuperview() + resellVC.removeFromParent() + resellVC.view.removeFromSuperview() + EstateVC.removeFromParent() + EstateVC.view.removeFromSuperview() + underline1.backgroundColor = .white + underline2.backgroundColor = .darkGray + underline3.backgroundColor = .darkGray + underline4.backgroundColor = .darkGray + self.addChild(TopView) + self.view.addSubview(TopView.view) + TopView.view.snp.makeConstraints{ + $0.leading.trailing.equalToSuperview().inset(23) + $0.top.equalTo(underline4.snp.bottom).offset(32) + $0.bottom.equalTo(view.safeAreaLayoutGuide) + } + + case 1: + stockView.removeFromParent() + stockView.view.removeFromSuperview() + resellVC.removeFromParent() + resellVC.view.removeFromSuperview() + TopView.removeFromParent() + TopView.view.removeFromSuperview() + self.addChild(EstateVC) + self.view.addSubview(EstateVC.view) + EstateVC.view.snp.makeConstraints{ + $0.leading.trailing.equalToSuperview().inset(23) + $0.top.equalTo(underline4.snp.bottom).offset(32) + $0.bottom.equalTo(view.safeAreaLayoutGuide) + } + underline1.backgroundColor = .darkGray + underline2.backgroundColor = .white + underline3.backgroundColor = .darkGray + underline4.backgroundColor = .darkGray + + + case 2: + TopView.removeFromParent() + TopView.view.removeFromSuperview() + EstateVC.removeFromParent() + EstateVC.view.removeFromSuperview() + resellVC.removeFromParent() + resellVC.view.removeFromSuperview() + underline1.backgroundColor = .darkGray + underline2.backgroundColor = .darkGray + underline3.backgroundColor = .white + underline4.backgroundColor = .darkGray + self.addChild(stockView) + self.view.addSubview(stockView.view) + stockView.view.snp.makeConstraints{ + $0.leading.trailing.equalToSuperview().inset(23) + $0.top.equalTo(underline4.snp.bottom).offset(32) + $0.bottom.equalTo(view.safeAreaLayoutGuide) + } + + + case 3: + TopView.removeFromParent() + TopView.view.removeFromSuperview() + stockView.removeFromParent() + stockView.view.removeFromSuperview() + EstateVC.removeFromParent() + EstateVC.view.removeFromSuperview() + underline1.backgroundColor = .darkGray + underline2.backgroundColor = .darkGray + underline3.backgroundColor = .darkGray + underline4.backgroundColor = .white + + + resellVC.delegate = self + self.addChild(resellVC) + self.view.addSubview(resellVC.view) + resellVC.view.snp.makeConstraints{ + $0.leading.trailing.equalToSuperview().inset(23) + $0.top.equalTo(underline4.snp.bottom).offset(32) + $0.bottom.equalTo(view.safeAreaLayoutGuide) + } + + + +// reSellView.alpha = 1 + default: break + } + } +} +extension ExploreViewController : showNavigationDelegate{ + func showSearchBar() { + layoutSearchBar() + } + func hideSearchBar() { + SetNavigationBar() + } + func SetNavigationBar(){ + ExploreViewController.isSearching = false + navigationItem.titleView = nil + let searchBtn = UIBarButtonItem(image: UIImage(systemName : "magnifyingglass"), style: .plain, target: self, action: #selector(showsearchbar)) + navigationItem.leftBarButtonItem = searchBtn + var config = UIButton.Configuration.plain() + var attributeString = AttributedString("-93") + attributeString.font = .systemFont(ofSize: 12, weight: .medium) + attributeString.foregroundColor = UIColor.systemBlue + config.attributedTitle = attributeString + config.titleAlignment = .leading + config.image = UIImage(named: "profile_mini") + config.imagePadding = 8 + config.imagePlacement = .trailing + let realbtn = UIButton(configuration: config) + let profileBtn = UIBarButtonItem(customView:realbtn ) + realbtn.addTarget(self, action: #selector(profileBtnClicked2), for: .touchUpInside) + navigationItem.rightBarButtonItem = profileBtn + } + + @objc func profileBtnClicked2(){ + print("마이페이지 가는중") + let vc = MyPageViewController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func showsearchbar(){ + layoutSearchBar() + } + func layoutSearchBar(){ + let searchbar = UISearchBar() + searchbar.delegate = self + searchbar.placeholder = "검색어를 입력해주세요" + searchbar.searchTextField.backgroundColor = .clear + navigationItem.leftBarButtonItem = .none + navigationItem.rightBarButtonItem = .none + self.navigationItem.titleView = searchbar + let underline3 = UnderlineView() + navigationItem.titleView?.addSubview(underline3) + underline3.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-8) + $0.leading.trailing.equalToSuperview().inset(15) + $0.height.equalTo(1.5) + } + } +} + +extension ExploreViewController :UISearchBarDelegate { + func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { + if(searchText.isEmpty){ + ExploreViewController.isSearching = false + } + else{ + ExploreViewController.isSearching = true + resellVC.resellSearchLists = resellVC.resellDataLists.filter{ + $0.name.contains(searchText) + }} + stockView.stockSearchLists = stockView.stockDataLists.filter{ + $0.name.contains(searchText) + } + stockView.StockaTableView.reloadData() + resellVC.resellTableView.reloadData() + + } +} diff --git a/LGHTSG/LGHTSG/Controller/FindPassWordController.swift b/LGHTSG/LGHTSG/Controller/FindPassWordController.swift new file mode 100644 index 0000000..83c9c58 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/FindPassWordController.swift @@ -0,0 +1,56 @@ +import UIKit + +class FindPassWordController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + let FindPwView = FindPwView() + self.view.addSubview(FindPwView) + view.backgroundColor = .black + + + FindPwView.translatesAutoresizingMaskIntoConstraints = false + FindPwView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + FindPwView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + FindPwView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + FindPwView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(FindPwView.navigationBar) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + FindPwView.navigationBar.tintColor = UIColor.white + FindPwView.navigationBar.standardAppearance = navigationAppearance + FindPwView.navigationBar.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + FindPwView.navigationBar.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + FindPwView.navigationBar.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "비밀번호 찾기") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + FindPwView.navigationBar.setItems([navItem], animated: true) + + // MARK: 키보드 올라갔을 때 화면 터치해서 내려가게함 + let tapGesture = UITapGestureRecognizer(target: self.view, action: #selector(self.view.endEditing(_:))) + self.view.addGestureRecognizer(tapGesture) + } + + @objc func tapDismissButton(){ + var userId = UserDefaults.standard.string(forKey: "id") + var pw = UserDefaults.standard.string(forKey: "pw") + + print("id : \(userId), pw : \(pw)") + self.presentingViewController?.dismiss(animated: true) + } + + + + +} diff --git a/LGHTSG/LGHTSG/Controller/HomeViewController.swift b/LGHTSG/LGHTSG/Controller/HomeViewController.swift new file mode 100644 index 0000000..5a6c5e4 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/HomeViewController.swift @@ -0,0 +1,171 @@ +// +// HomeViewController.swift +// LGHTSG +// +// Created by SunHo Lee on 2023/01/11. +// +import SnapKit +import Foundation +import UIKit +final class HomeViewController : UIViewController{ + private var segmentControl = UnderlineSegmentedControl(items: ["나의 자산", "판매한 자산"]) + var changepercent : String = "-7.2%" + var tableview = UITableView() + var underline1 = UnderlineView() + var underline2 = UnderlineView() + var assetList = [asset]() + var assetmodel = AssetModel() + override func viewDidLoad(){ + super.viewDidLoad() + SetNavigationBar() + setTobTabbar() + segmentControl.addTarget(self, action: #selector(clicksegment), for: .valueChanged) + + setTable() +// assetmodel.delegate = self +// assetmodel.getAsset() + } + // 나의 자산, 판매한 자산 + @objc func clicksegment(_ sender : UISegmentedControl){ + if sender.selectedSegmentIndex == 0{ + underline1.backgroundColor = .white + underline2.backgroundColor = .darkGray + }else{ + underline1.backgroundColor = .darkGray + underline2.backgroundColor = .white + } + } + + +} +private extension HomeViewController{ + + // 네비게이션바 다시 생성 + @objc func shownavigationBar(){ + SetNavigationBar() + } + + + private func SetNavigationBar(){ + navigationItem.titleView = nil + let searchBtn = UIBarButtonItem(image: UIImage(systemName : "magnifyingglass"), style: .plain, target: self, action: #selector(showsearchbar)) + navigationItem.leftBarButtonItem = searchBtn + var config = UIButton.Configuration.plain() + var attributeString = AttributedString(changepercent) + attributeString.font = .systemFont(ofSize: 12, weight: .medium) + attributeString.foregroundColor = UIColor.systemBlue + config.attributedTitle = attributeString + config.titleAlignment = .leading + config.image = UIImage(named: "profile_mini") + config.imagePadding = 8 + config.imagePlacement = .trailing + let realbtn = UIButton(configuration: config) + let profileBtn = UIBarButtonItem(customView:realbtn) + realbtn.addTarget(self, action: #selector(profileBtnClicked), for: .touchUpInside) + navigationItem.rightBarButtonItem = profileBtn + } + + @objc func profileBtnClicked(){ + print("마이페이지 가는중") + let vc = MyPageViewController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func showsearchbar(){ + layoutSearchBar() + } + func layoutSearchBar(){ + let searchbar = UISearchBar() + searchbar.placeholder = "검색어를 입력해주세요" + searchbar.searchTextField.backgroundColor = .clear + navigationItem.leftBarButtonItem = .none + navigationItem.rightBarButtonItem = .none + self.navigationItem.titleView = searchbar + let underline3 = UnderlineView() + navigationItem.titleView?.addSubview(underline3) + underline3.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-8) + $0.leading.trailing.equalToSuperview().inset(15) + $0.height.equalTo(1.5) + } + } + func setTobTabbar(){ + view.addSubview(segmentControl) + view.addSubview(underline1) + view.addSubview(underline2) + underline1.backgroundColor = .white + segmentControl.snp.makeConstraints{ + $0.top.equalTo(view.safeAreaLayoutGuide.snp.top) + $0.leading.trailing.equalToSuperview() + $0.height.equalTo(50) + } + underline1.snp.makeConstraints{ + $0.leading.equalToSuperview().inset(20) + $0.height.equalTo(1.5) + $0.top.equalTo(segmentControl.snp.bottom).offset(-6) + $0.trailing.equalToSuperview().inset(view.frame.width/2 + 5) + } + underline2.snp.makeConstraints{ + $0.leading.equalTo(view.snp.centerX).offset(5) + $0.height.equalTo(1.5) + $0.top.equalTo(segmentControl.snp.bottom).offset(-6) + $0.trailing.equalToSuperview().inset(20) + } + } + private func setTable(){ + view.addSubview(tableview) + tableview.register(HomeTableCell.self, forCellReuseIdentifier: "HomeTableCell") + tableview.delegate = self + tableview.rowHeight = 56 + tableview.dataSource = self + tableview.separatorStyle = .none + + tableview.snp.makeConstraints{ + $0.top.equalTo(underline1.snp.bottom).offset(32) + $0.leading.trailing.equalToSuperview().inset(33) + $0.bottom.equalToSuperview().inset(100) + } + } +} +extension HomeViewController : UITableViewDelegate,UITableViewDataSource { + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableview.dequeueReusableCell(withIdentifier: "HomeTableCell", for: indexPath) as? HomeTableCell +// cell?.setup(with: assetList[indexPath.row]) + cell?.setuppp() + cell?.countLabel.text = "\(indexPath.row+1)" + + return cell ?? UITableViewCell() + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { +// let selectedIndex = self.segmentControl.selectedSegmentIndex +// switch selectedIndex{ +// case 0: +// return assetList.count +// case 1: +// return assetList.count +// default: +// return 0 +// } + 20 + } + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + } + func scrollViewDidScroll(_ scrollView: UIScrollView) { + if self.tableview.contentOffset.y < 0 { + layoutSearchBar() + } + else if tableview.contentOffset.y>100 { + SetNavigationBar() + } + } +} +//extension HomeViewController : AssetModelProtocol{ +// // MARK : assetmodel protocol function +// func assetRetrived(assets : [asset]){ +// self.assetList = assets +// tableview.reloadData() +// } +//} diff --git a/LGHTSG/LGHTSG/Controller/MainTabController.swift b/LGHTSG/LGHTSG/Controller/MainTabController.swift index 7615f86..74928fb 100644 --- a/LGHTSG/LGHTSG/Controller/MainTabController.swift +++ b/LGHTSG/LGHTSG/Controller/MainTabController.swift @@ -6,6 +6,32 @@ // import UIKit +<<<<<<< Updated upstream +======= +import Foundation +class MainTabController: UITabBarController { + var changepercent : String = "-7.2%" + + + override func viewDidLoad() { + view.backgroundColor = .black + super.viewDidLoad() +// SetNavigationBar() +// swipeGestureNavigationBar() + let systemFontAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12.0, weight: .semibold)] + UITabBarItem.appearance().setTitleTextAttributes(systemFontAttributes, for: .normal) + let HomeVC = UINavigationController(rootViewController: HomeViewController()) + HomeVC.tabBarItem.title = "Home" + HomeVC.tabBarItem.image = UIImage(named: "home2") + HomeVC.tabBarItem.selectedImage = UIImage(named: "home") + let ExploreVC = UINavigationController(rootViewController:ExploreViewController()) + ExploreVC.tabBarItem.title = "Explore" + ExploreVC.tabBarItem.image = UIImage(named : "compass") + ExploreVC.tabBarItem.selectedImage = UIImage(named: "compass2") + tabBar.layer.borderColor = UIColor.label.cgColor + tabBar.clipsToBounds = false + viewControllers = [HomeVC,ExploreVC] +>>>>>>> Stashed changes class MainTabController: UIViewController { diff --git a/LGHTSG/LGHTSG/Controller/MyPageController.swift b/LGHTSG/LGHTSG/Controller/MyPageController.swift new file mode 100644 index 0000000..d726f15 --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/MyPageController.swift @@ -0,0 +1,49 @@ +// +// MyPageController.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/26. +// + +import UIKit + +class MyPageController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + let MyPageView = MyPageView() + view.addSubview(MyPageView) + + // MARK: 네비게이션 컨트롤러 + self.view.addSubview(MyPageView.navigationBar7) + let safeArea = self.view.safeAreaLayoutGuide + let navigationAppearance = UINavigationBarAppearance() + + navigationAppearance.backgroundColor = .black + navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + MyPageView.navigationBar7.tintColor = UIColor.white + MyPageView.navigationBar7.standardAppearance = navigationAppearance + MyPageView.navigationBar7.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + MyPageView.navigationBar7.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true + MyPageView.navigationBar7.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true + + let navItem = UINavigationItem(title: "마이페이지") + let leftButton = UIBarButtonItem(image: UIImage(named: "back-arrow"), style: .plain, target: self, action: #selector(tapDismissButton)) + + navItem.leftBarButtonItem = leftButton + + //MyPageView.navigationBar2.setItems([navItem], animated: true) + + + // MARK: 화면 전환이나 실행함수 + //MyPageView.nextBtn.addTarget(self, action: #selector(nextBtnClicked), for: .touchUpInside) + + } + + @objc func tapDismissButton(){ + self.presentingViewController?.dismiss(animated: true) + + } + +} diff --git a/LGHTSG/LGHTSG/Controller/StockChartViewController.swift b/LGHTSG/LGHTSG/Controller/StockChartViewController.swift new file mode 100644 index 0000000..0fc431e --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/StockChartViewController.swift @@ -0,0 +1,455 @@ +// +// StockChartViewController.swift +// LGHTSG +// +// Created by SunHo Lee on 2023/01/31. +// + +import Foundation +import UIKit +import Charts +import SnapKit +class StockChartViewController : UIViewController { + var stockPriceData = StockPriceModel() + var EstatePriceData = EstatePriceModel() + var nameText : String? + + var idx : Int? + var pricePercentText : String? + var changeDateText : String? + var priceListDatas = [Int]() + var timeListDatas = [String]() + var temppriceListDatas = [Int]() + var temptimeListDatas = [String]() + lazy var lineChartView : LineChartView = { + let chartView = LineChartView() + return chartView + }() + private lazy var nameLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 17, weight: .semibold) + label.text = nameText + return label + }() + private lazy var priceLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 14, weight: .medium) + label.textColor = UIColor.systemGray + + return label + }() + private lazy var pricePercent : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight: .medium) + label.text = pricePercentText + if (label.text!.prefix(1) == "-"){ + label.textColor = UIColor.blue + }else{ + label.textColor = UIColor.red + } + return label + }() + private lazy var changeDate : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight : .medium) + label.textColor = UIColor.systemGray + label.text = changeDateText + return label + }() + //MARK: - Label + private lazy var dealLabel: UILabel = { + let label = UILabel() + label.text = "거래 이력" + label.font = UIFont.systemFont(ofSize: 12, weight: .light) + label.textColor = .white + return label + }() + + private lazy var revenueLabel: UILabel = { + let label = UILabel() + label.text = "구매 시점에 비해 얼마 올랐어요" + label.textColor = .white + label.font = UIFont.systemFont(ofSize: 16, weight: .bold) + return label + }() + + + private var lineImage = UnderlineView() + + + //MARK: - SegmentControl + private lazy var segmentCtrl: UISegmentedControl = { + let items = ["1일","월", "1년", "5년"] + let seg = UISegmentedControl(items: items) + seg.addTarget(self, action: #selector(indexChanged(_:)), for: .valueChanged) + seg.layer.cornerRadius = 0.7 + seg.backgroundColor = UIColor(named: "dropdown") + seg.tintColor = .lightGray + seg.setTitleTextAttributes( + [ + NSAttributedString.Key.foregroundColor: UIColor.white, + .font: UIFont.systemFont(ofSize: 14, weight: .semibold) + ], + for: .selected + ) + seg.setTitleTextAttributes( + [ + NSAttributedString.Key.foregroundColor: UIColor.systemGray, + .font: UIFont.systemFont(ofSize: 14, weight: .semibold) + ], + for: .normal + ) + seg.selectedSegmentIndex = 3 + return seg + }() + + //MARK: - Button + private lazy var sellButton: UIButton = { + let btn = UIButton() + btn.setTitle("판매", for: .normal) + btn.setTitleColor(.blue, for: .normal) + btn.backgroundColor = .white + btn.layer.cornerRadius = 5 + btn.layer.borderWidth = 1 + return btn + + }() + + //MARK: - TableView + private lazy var tableView: UITableView = { + let table = UITableView() + table.backgroundColor = .black + + return table + + }() + + //MARK: - LifeCycle + override func viewDidLoad() { + super.viewDidLoad() + + configure() + setLineChartView() + + } + //MARK: - TableViewSetting + func setupTableView(){ + tableView.delegate = self + tableView.dataSource = self + tableView.separatorStyle = .none + tableView.register(EstateDetailCell.self, forCellReuseIdentifier: EstateDetailCell.identifier) + } + @objc func indexChanged(_ sender: UISegmentedControl){ + switch sender.selectedSegmentIndex{ + case 0: + changeDate.text = "일주일 대비" + let daypricedata : [Int] = priceListDatas.suffix(7) + let daytimeListDatas : [String] = timeListDatas.suffix(7) + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: daypricedata), xAxis: daytimeListDatas, recentPrice : Double(daypricedata.last!)) + temptimeListDatas = daytimeListDatas + temppriceListDatas = daypricedata + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + tableView.reloadData() + case 1: + changeDate.text = "한달 전 대비" + let monthpricedata : [Int] = priceListDatas.suffix(31) + let monthtimeListDatas : [String] = timeListDatas.suffix(31) + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: monthpricedata), xAxis: monthtimeListDatas, recentPrice : Double(monthpricedata.last!)) + temppriceListDatas = monthpricedata + temptimeListDatas = monthtimeListDatas + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + tableView.reloadData() + case 2: + changeDate.text = "1년 전 대비" + temppriceListDatas = [] + temptimeListDatas = [] + guard let recentTimestring = timeListDatas.last else{ return} + // 만약 주식이 상장된지 1년이 안되었다면? 기준을 245개로 잡음 + if(timeListDatas.count < 243){ +// temppriceListDatas = [] +// temptimeListDatas = [] +// for (index, element ) in timeListDatas.enumerated(){ +// if index % 5 == 0 { +// temptimeListDatas.append(element) +// } +// } +// for (index, element ) in priceListDatas.enumerated(){ +// if index % 5 == 0 { +// temppriceListDatas.append(element) +// } +// } + temppriceListDatas = priceListDatas + temptimeListDatas = timeListDatas + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: priceListDatas), xAxis: timeListDatas, recentPrice : Double(priceListDatas.last!)) + tableView.reloadData() + } + else{ + let recenttimedata = Array(recentTimestring) + let changeyear = Int(String(recenttimedata[3]))! - 1 + let changeyearString = recentTimestring.prefix(3) + "\(changeyear)" + recentTimestring.dropFirst(4) + // 정확히 1년전데이터가 있는경우 ex) 2023-1-31 > 2022-1-31 + if let firstindex = timeListDatas.firstIndex(of: String(changeyearString)) { + let temptimeList = Array(timeListDatas.dropFirst(firstindex)) + for (index, element ) in temptimeList.enumerated(){ + if index % 5 == 0 { + temptimeListDatas.append(element) + } + } + let temppriceList = Array(priceListDatas.dropFirst(firstindex)) + for (index, element ) in temppriceList.enumerated(){ + if index % 5 == 0 { + temppriceListDatas.append(element) + } + } + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: temppriceListDatas), xAxis: temptimeListDatas, recentPrice : Double(temppriceListDatas.last!)) + tableView.reloadData() + } + // 그런데 1년이상이지만 날짜상 그날이 휴장일일때를 대비해서 그냥 244개만 데이터 뽑기. + else{ + let beforePriceData = priceListDatas.suffix(244) + let beforeTimeData = timeListDatas.suffix(244) + for (index, element ) in beforeTimeData.enumerated(){ + if index % 5 == 0 { + temptimeListDatas.append(element) + } + } + for (index, element ) in beforePriceData.enumerated(){ + if index % 5 == 0 { + temppriceListDatas.append(element) + } + } + if(!temptimeListDatas.contains( recentTimestring)){ + temptimeListDatas.append(recentTimestring) + temppriceListDatas.append(priceListDatas.last!) + } + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: temppriceListDatas), xAxis: temptimeListDatas, recentPrice : Double(temppriceListDatas.last!)) + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + tableView.reloadData() + }} + + + case 3: + changeDate.text = "5년전 대비" + temppriceListDatas = [] + temptimeListDatas = [] + for (index, element ) in timeListDatas.enumerated(){ + if index % 5 == 0 { + temptimeListDatas.append(element) + } + } + for (index, element ) in priceListDatas.enumerated(){ + if index % 5 == 0 { + temppriceListDatas.append(element) + } + } + pricePercent.text = "\(String(format: "%.2f", Double((temppriceListDatas.last! - temppriceListDatas[0])) / Double(temppriceListDatas[0]) * 100))%" + if(pricePercent.text?.prefix(1) == "-"){ + pricePercent.textColor = UIColor.blue + } + else{ + pricePercent.textColor = UIColor.red + } + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: temppriceListDatas), xAxis: temptimeListDatas, recentPrice : Double(temppriceListDatas.last!)) + tableView.reloadData() + default: + break + } + } + } + extension StockChartViewController : UITableViewDelegate, UITableViewDataSource { + //cell 높이조절 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 30 + } + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return temptimeListDatas.count } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell(withIdentifier: EstateDetailCell.identifier, for: indexPath) as? EstateDetailCell else { return UITableViewCell() } + + cell.date.text = temptimeListDatas[indexPath.row] + cell.date.textColor = .white + cell.price.text = "\(temppriceListDatas[indexPath.row])원" + cell.price.textColor = .white + cell.buysell.text = "hello" + cell.buysell.textColor = .white + return cell + } + } + extension StockChartViewController { + func setLineData(lineChartView: LineChartView, lineChartDataEntries: [ChartDataEntry], xAxis : [String], recentPrice : Double) { + // Entry들을 이용해 Data Set 만들기(그런데 우리는 각 포인트를 나타내줄 필요가 없어서 지워줌 + let lineChartdataSet = LineChartDataSet(entries: lineChartDataEntries, label: "주가") + lineChartdataSet.drawValuesEnabled = false + lineChartdataSet.drawCirclesEnabled = false + lineChartdataSet.colors = [.blue] + //선택했을때 라인 지워주기 + lineChartdataSet.drawHorizontalHighlightIndicatorEnabled = false + // lineChartdataSet.drawVerticalHighlightIndicatorEnabled = false + lineChartdataSet.highlightColor = .white + + // DataSet을 차트 데이터로 넣기 + let lineChartData = LineChartData(dataSet: lineChartdataSet) + // 데이터 출력 + lineChartView.data = lineChartData + // 선제거 + lineChartView.leftAxis.drawGridLinesEnabled = false + lineChartView.rightAxis.drawGridLinesEnabled = false + lineChartView.leftAxis.enabled = false // 왼쪽 label 값 지워주기 + lineChartView.rightAxis.enabled = false // right + lineChartView.xAxis.enabled = false // 위쪽 label + lineChartView.xAxis.drawGridLinesEnabled = false + lineChartView.xAxis.drawAxisLineEnabled = false + lineChartView.doubleTapToZoomEnabled = false + // 아래 뜨는 어떤항목인지 알려주는 label 제거 + lineChartView.legend.enabled = false + lineChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: xAxis) + + let marker = ChartMarker(pricedate: xAxis, recentprice: recentPrice) + + marker.chartView = lineChartView + marker.chartx = view.frame.width - 10 + lineChartView.marker = marker + lineChartView.drawMarkers = true + // 데이터 소수점 제거 + let formatter = NumberFormatter() + formatter.minimumFractionDigits = 0 + lineChartView.data?.setValueFormatter(DefaultValueFormatter(formatter:formatter)) + } + // entry 만들기 + func entryData(yvalues: [Int]) -> [ChartDataEntry] { + // entry 담을 array + var lineDataEntries: [ChartDataEntry] = [] + // 담기 + for i in 0 ..< yvalues.count { + let lineDataEntry = ChartDataEntry(x: Double(i), y: Double(yvalues[i])) + lineDataEntries.append(lineDataEntry) + } + // 반환 + return lineDataEntries + } + private func setLineChartView() { + stockPriceData.requestStockPrice(stockIdx: self.idx!, onCompleted: { (pricelists, transctiontime) in + DispatchQueue.main.async { + self.view.addSubview(self.lineChartView) + let sortedtimeLists = transctiontime.sorted{$0.compare($1, options: .numeric) == .orderedAscending} + self.priceListDatas = pricelists + self.priceLabel.text = "\(self.priceListDatas.last!)원" + self.timeListDatas = sortedtimeLists + self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: pricelists), xAxis: sortedtimeLists, recentPrice : Double(pricelists.last!)) + self.setupTableView() + } + }) + // EstatePriceData.requestStockPrice(EstateIdx: self.idx!, onCompleted: { (pricelists, transctiontime) in + // DispatchQueue.main.async { + // self.view.addSubview(self.lineChartView) + // self.setLineData(lineChartView: self.lineChartView, lineChartDataEntries: self.entryData( yvalues: pricelists), xAxis: transctiontime, recentPrice : Double(pricelists.last!)) + //// self.lineChartView.snp.makeConstraints{ + //// $0.leading.trailing.equalToSuperview() + //// $0.top.bottom.equalToSuperview().inset(140) + //// } + // } + // }) + } + + } + + + extension StockChartViewController { + //MARK: - Configure + private func configure(){ + lineImage.backgroundColor = .label + [nameLabel, priceLabel, pricePercent,changeDate, sellButton, tableView, lineImage,dealLabel, revenueLabel, segmentCtrl,lineChartView] + .forEach {view.addSubview($0)} + nameLabel.snp.makeConstraints{ + $0.top.equalTo(view.safeAreaLayoutGuide.snp.top ).offset(10) + $0.leading.equalToSuperview().inset(15) + } + priceLabel.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(8) + $0.leading.equalTo(nameLabel.snp.leading) + } + pricePercent.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(9) + $0.leading.equalTo(priceLabel.snp.trailing).offset(8) + } + changeDate.snp.makeConstraints{ + $0.top.equalTo(nameLabel.snp.bottom).offset(10) + $0.leading.equalTo(pricePercent.snp.trailing).offset(8) + } + lineChartView.snp.makeConstraints{ + $0.top.equalTo(priceLabel.snp.bottom).offset(30) + $0.leading.equalToSuperview().inset(15) + $0.trailing.equalToSuperview().inset(15) + $0.bottom.equalTo(view.snp.centerY).offset(20) + } + segmentCtrl.snp.makeConstraints{ + $0.top.equalTo(lineChartView.snp.bottom) + $0.leading.equalToSuperview().inset(15) + $0.trailing.equalToSuperview().inset(15) + } + revenueLabel.snp.makeConstraints{ + $0.leading.equalToSuperview().inset(33) + $0.top.equalTo(segmentCtrl.snp.bottom).offset(24) + } + + dealLabel.snp.makeConstraints{ + $0.top.equalTo(revenueLabel.snp.bottom).offset(24) + $0.leading.equalToSuperview().inset(33) + } + lineImage.snp.makeConstraints{ + + $0.leading.equalToSuperview().inset(33) + $0.trailing.equalToSuperview().inset(33) + $0.height.equalTo(1) + $0.top.equalTo(dealLabel.snp.bottom).offset(4) + } + + tableView.snp.makeConstraints{ + $0.top.equalTo(lineImage.snp.bottom) + $0.bottom.equalTo(sellButton.snp.top).offset(-20) + $0.leading.equalToSuperview().inset(33) + $0.trailing.equalToSuperview().inset(33) + } + + sellButton.snp.makeConstraints{ + $0.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-10) + $0.leading.equalToSuperview().inset(33) + $0.height.equalTo(48) + $0.trailing.equalToSuperview().inset(33) + } + } + } + diff --git a/LGHTSG/LGHTSG/Controller/ViewController.swift b/LGHTSG/LGHTSG/Controller/ViewController.swift new file mode 100644 index 0000000..a70d89a --- /dev/null +++ b/LGHTSG/LGHTSG/Controller/ViewController.swift @@ -0,0 +1,55 @@ +// +// ViewController.swift +// LGHTSG +// +// Created by HA on 2023/01/09. +// + +import UIKit + +class ViewController: UIViewController { + + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + + + let StartView = StartView() + self.view.addSubview(StartView) + + + StartView.translatesAutoresizingMaskIntoConstraints = false + StartView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + StartView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + StartView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + StartView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + StartView.loginBtn.addTarget(self, action: #selector(loginBtnClicked), for: .touchUpInside) + StartView.joinBtn.addTarget(self, action: #selector(joinBtnClicked), for: .touchUpInside) + StartView.findPwBtn.addTarget(self, action: #selector(findPwBtnClicked), for: .touchUpInside) + } + + @objc func loginBtnClicked() { + let vc = LoginController() + vc.modalPresentationStyle = .overCurrentContext + self.present(vc, animated: true) + } + + @objc func joinBtnClicked() { + let vc = CheckAgreeController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func findPwBtnClicked(){ + let vc = FindPassWordController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + + +} + diff --git a/LGHTSG/LGHTSG/Info.plist b/LGHTSG/LGHTSG/Info.plist index 0eb786d..059d9f4 100644 --- a/LGHTSG/LGHTSG/Info.plist +++ b/LGHTSG/LGHTSG/Info.plist @@ -2,6 +2,21 @@ + UIAppFonts + + NanumSquareB.ttf + NanumSquareR.ttf + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UIAppFonts + + NanumSquareB.ttf + NanumSquareR.ttf + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/LGHTSG/LGHTSG/Model/Login.swift b/LGHTSG/LGHTSG/Model/Login.swift new file mode 100644 index 0000000..b428f9e --- /dev/null +++ b/LGHTSG/LGHTSG/Model/Login.swift @@ -0,0 +1,20 @@ +// +// LoginDataModel.swift +// LGHTSG +// + +import Foundation + +// MARK: - Model +struct Login : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultCode : Int + } + + struct body : Decodable { + let jwt : String + } +} diff --git a/LGHTSG/LGHTSG/Model/LoginModel.swift b/LGHTSG/LGHTSG/Model/LoginModel.swift new file mode 100644 index 0000000..85ffb9e --- /dev/null +++ b/LGHTSG/LGHTSG/Model/LoginModel.swift @@ -0,0 +1,72 @@ +// +// LoginModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import Alamofire + +class LoginModel { + + let url = "http://api.lghtsg.site:8090/users/log-in" + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + func requestLogin(bodyData : Parameters) { + + // [http 요청 수행 실시] + print("") + print("====================================") + print("requestLogin() :: Post Body Json 방식 http 요청 실시]") + print("주 소 :: \(url)") + print("데이터 :: \(bodyData.description) ") + print("====================================") + print("") + + + AF.request( + url, // [주소] + method: .post, // [전송 타입] + parameters: bodyData, // [전송 데이터] + encoding: JSONEncoding.default, // [인코딩 스타일] + headers: header // [헤더 지정] + ) + .validate(statusCode: 200..<512) + .responseData { response in + switch response.result { + case .success(let res): + do { + print("") + print("====================================") + print("응답 코드 :: \(response.response?.statusCode ?? 0)") + print("응답 데이터 :: \(String(data: res, encoding: .utf8) ?? "")") + print("====================================") + print("") + } + catch (let err){ + print("") + print("====================================") + print("-------------------------------") + print("catch :: ", err.localizedDescription) + print("====================================") + print("") + } + break + case .failure(let err): + print("") + print("====================================") + print("-------------------------------") + print("응답 코드 :: \(response.response?.statusCode ?? 0)") + print("-------------------------------") + print("에 러 :: \(err.localizedDescription)") + print("====================================") + print("") + break + } + } + + } +} diff --git a/LGHTSG/LGHTSG/Model/LoginResultModel.swift b/LGHTSG/LGHTSG/Model/LoginResultModel.swift new file mode 100644 index 0000000..3ab5226 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/LoginResultModel.swift @@ -0,0 +1,16 @@ +// +// LoginResultModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/26. +// + +import Foundation +class LoginResult { + + var jwt : String + + init(jwt: String) { + self.jwt = jwt + } +} diff --git a/LGHTSG/LGHTSG/Model/changePw.swift b/LGHTSG/LGHTSG/Model/changePw.swift new file mode 100644 index 0000000..c3cab47 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/changePw.swift @@ -0,0 +1,17 @@ +// +// changePw.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/31. +// + +import Foundation + +struct changePw : Decodable { + + var body : String + + init(body: String) { + self.body = body + } +} diff --git a/LGHTSG/LGHTSG/Model/email.swift b/LGHTSG/LGHTSG/Model/email.swift new file mode 100644 index 0000000..b4256f2 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/email.swift @@ -0,0 +1,17 @@ +// +// email.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/27. +// + +// MARK: - Model +struct email : Decodable { + + let body : String + + struct header : Decodable { + let resultCode : Int + } + +} diff --git a/LGHTSG/LGHTSG/Model/emailCheckModel.swift b/LGHTSG/LGHTSG/Model/emailCheckModel.swift new file mode 100644 index 0000000..0c8e8f5 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/emailCheckModel.swift @@ -0,0 +1,76 @@ +// +// emailCheckModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import Alamofire + +class emailCheck { + + + let url = "http://api.lghtsg.site:8090/users/sign-up/emailCheck" + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + func requestCode(bodyData : Parameters) { + + // [http 요청 수행 실시] + print("") + print("====================================") + print("requestLogin() :: Post Body Json 방식 http 요청 실시]") + print("-------------------------------") + print("주 소 :: \(url)") + print("-------------------------------") + print("데이터 :: \(bodyData.description) ") + print("====================================") + print("") + + + AF.request( + url, // [주소] + method: .post, // [전송 타입] + parameters: bodyData, // [전송 데이터] + encoding: JSONEncoding.default, // [인코딩 스타일] + headers: header // [헤더 지정] + ) + .validate(statusCode: 200..<4015) + .responseData { response in + switch response.result { + case .success(let res): + do { + print("") + print("====================================") + print("응답 코드 :: \(response.response?.statusCode ?? 0)") + print("-------------------------------") + print("응답 데이터 :: \(String(data: res, encoding: .utf8) ?? "")") + print("====================================") + print("") + } + catch (let err){ + print("") + print("====================================") + print("-------------------------------") + print("catch :: ", err.localizedDescription) + print("====================================") + print("") + } + break + case .failure(let err): + print("") + print("====================================") + print("-------------------------------") + print("응답 코드 :: \(response.response?.statusCode ?? 0)") + print("-------------------------------") + print("에 러 :: \(err.localizedDescription)") + print("====================================") + print("") + break + } + } + + } +} diff --git a/LGHTSG/LGHTSG/Model/join.swift b/LGHTSG/LGHTSG/Model/join.swift new file mode 100644 index 0000000..10be859 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/join.swift @@ -0,0 +1,22 @@ +// +// join.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/28. +// + +import Foundation +// MARK: - Model + +struct join : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultCode : Int + } + + struct body : Decodable { + let userIdx : Int + } +} diff --git a/LGHTSG/LGHTSG/Model/login&join&changepw/changePw.swift b/LGHTSG/LGHTSG/Model/login&join&changepw/changePw.swift new file mode 100644 index 0000000..c3cab47 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/login&join&changepw/changePw.swift @@ -0,0 +1,17 @@ +// +// changePw.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/31. +// + +import Foundation + +struct changePw : Decodable { + + var body : String + + init(body: String) { + self.body = body + } +} diff --git a/LGHTSG/LGHTSG/Model/login&join&changepw/email.swift b/LGHTSG/LGHTSG/Model/login&join&changepw/email.swift new file mode 100644 index 0000000..b4256f2 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/login&join&changepw/email.swift @@ -0,0 +1,17 @@ +// +// email.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/27. +// + +// MARK: - Model +struct email : Decodable { + + let body : String + + struct header : Decodable { + let resultCode : Int + } + +} diff --git a/LGHTSG/LGHTSG/Model/login&join&changepw/join.swift b/LGHTSG/LGHTSG/Model/login&join&changepw/join.swift new file mode 100644 index 0000000..10be859 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/login&join&changepw/join.swift @@ -0,0 +1,22 @@ +// +// join.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/28. +// + +import Foundation +// MARK: - Model + +struct join : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultCode : Int + } + + struct body : Decodable { + let userIdx : Int + } +} diff --git a/LGHTSG/LGHTSG/Model/login&join&changepw/login.swift b/LGHTSG/LGHTSG/Model/login&join&changepw/login.swift new file mode 100644 index 0000000..0fc76bc --- /dev/null +++ b/LGHTSG/LGHTSG/Model/login&join&changepw/login.swift @@ -0,0 +1,22 @@ +// +// LoginDataModel.swift +// LGHTSG +// + +import Foundation + +// MARK: - Model +struct Login : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultMsg : String + let resultCode : Int + } + + + struct body : Decodable { + let jwt : String + } +} diff --git a/LGHTSG/LGHTSG/Model/login&join&changepw/user.swift b/LGHTSG/LGHTSG/Model/login&join&changepw/user.swift new file mode 100644 index 0000000..fb5cf22 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/login&join&changepw/user.swift @@ -0,0 +1,22 @@ +// +// user.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/28. +// + +import Foundation +// MARK: - Model + +struct user : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultCode : Int + } + + struct body : Decodable { + let userIdx : Int + } +} diff --git a/LGHTSG/LGHTSG/Model/user.swift b/LGHTSG/LGHTSG/Model/user.swift new file mode 100644 index 0000000..fb5cf22 --- /dev/null +++ b/LGHTSG/LGHTSG/Model/user.swift @@ -0,0 +1,22 @@ +// +// user.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/28. +// + +import Foundation +// MARK: - Model + +struct user : Decodable { + let body : body + let header : header + + struct header : Decodable { + let resultCode : Int + } + + struct body : Decodable { + let userIdx : Int + } +} diff --git a/LGHTSG/LGHTSG/View/CheckView/CheckAgreeView.swift b/LGHTSG/LGHTSG/View/CheckView/CheckAgreeView.swift new file mode 100644 index 0000000..977c7c2 --- /dev/null +++ b/LGHTSG/LGHTSG/View/CheckView/CheckAgreeView.swift @@ -0,0 +1,441 @@ +// +// CheckAgreeView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckAgreeView: UIView { + + + var allChecked:Bool = false + var isChecked:Bool = false + var isChecked2:Bool = false + var isChecked3:Bool = false + var isChecked4:Bool = false + + + // MARK: 네비게이션 바 생성 + let navigationBar3 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + + let lineImageView : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "line") + return image + }() + + + let agreeLabel : UILabel = { + let label = UILabel() + label.text = "약관 동의" + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 18.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let allAgreeLabel : UILabel = { + let label = UILabel() + label.text = "모두 동의하기" + label.textColor = .white + label.font = UIFont(name: "NanumSquareR", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + // MARK: 체크박스 + let checkBox: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let checkBox2: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked2), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let checkBox3: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked3), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let checkBox4: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked4), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 텍스트 상자 + let textboxView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-box") + return image + }() + + let textboxContent: UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem " + label.numberOfLines = 0 + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 각 이용약관 동의버튼 + let agreeBtn1: UIButton = { + let btn = UIButton() + btn.backgroundColor = .black + btn.setImage(UIImage(named: "서비스 이용약관"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let agreeBtn2: UIButton = { + let btn = UIButton() + btn.backgroundColor = .clear + btn.setImage(UIImage(named: "개인정보 처리방침"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let agreeBtn3: UIButton = { + let btn = UIButton() + btn.backgroundColor = .clear + btn.setImage(UIImage(named: "마케팅 정보"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView2 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextBtn2 : UIButton = { + let btn = UIButton() + btn.setTitle("다음으로", for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.titleLabel?.textColor = .white + btn.titleLabel?.textAlignment = .center + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 버튼 관련 함수 + @objc func buttonClicked(button:UIButton){ + + print("buttonClicked") + + // MARK: 클릭했는데 그 전에 클릭된 것이 없다면 + if allChecked == false { + checkBox.setImage(UIImage(named: "check-box"), for: .normal) + checkBox2.setImage(UIImage(named: "check-box"), for: .normal) + checkBox3.setImage(UIImage(named: "check-box"), for: .normal) + checkBox4.setImage(UIImage(named: "check-box"), for: .normal) + + // MARK: 다 체크되었다는 뜻으로 true로 설정 + isChecked = true + isChecked2 = true + isChecked3 = true + isChecked4 = true + allChecked = true + + // MARK: true 값을 넣어준다. + UserDefaults.standard.set(allChecked, forKey: "allcheck") + UserDefaults.standard.set(isChecked2, forKey: "check1") + UserDefaults.standard.set(isChecked3, forKey: "check2") + UserDefaults.standard.set(isChecked4, forKey: "check3") + + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + + } + else + { + checkBox.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox2.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox3.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox4.setImage(UIImage(named: "not-check-box"), for: .normal) + + isChecked = false + isChecked2 = false + isChecked3 = false + isChecked4 = false + allChecked = false + UserDefaults.standard.set(allChecked, forKey: "allcheck") + UserDefaults.standard.set(isChecked2, forKey: "check1") + UserDefaults.standard.set(isChecked3, forKey: "check2") + UserDefaults.standard.set(isChecked4, forKey: "check3") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + + } + + + @objc func buttonClicked2(button:UIButton){ + + if isChecked2 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + } + + if isChecked2 == true{ + isChecked2 = false + UserDefaults.standard.set(isChecked2, forKey: "check1") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked2 = true + UserDefaults.standard.set(isChecked2, forKey: "check1") + + // MARK: 두 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked3 == true && isChecked4 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + } + } + + + + + + + @objc func buttonClicked3(button:UIButton){ + + if isChecked3 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + } + + if isChecked3 == true{ + isChecked3 = false + UserDefaults.standard.set(isChecked3, forKey: "check2") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked3 = true + UserDefaults.standard.set(isChecked3, forKey: "check2") + + // MARK: 세 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked2 == true && isChecked4 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + } + + } + + @objc func buttonClicked4(button:UIButton){ + + if isChecked4 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + //check2height.isActive = true + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + // check2height.isActive = false + } + + if isChecked4 == true{ + isChecked4 = false + UserDefaults.standard.set(isChecked4, forKey: "check3") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked4 = true + UserDefaults.standard.set(isChecked4, forKey: "check3") + + // MARK: 네 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked2 == true && isChecked3 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + + } + } + + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(agreeLabel) + + + addSubview(lineImageView) + addSubview(allAgreeLabel) + addSubview(checkBox) + + + addSubview(textboxView) + addSubview(textboxContent) + + addSubview(checkBox2) + addSubview(checkBox3) + addSubview(checkBox4) + + addSubview(agreeBtn1) + addSubview(agreeBtn2) + addSubview(agreeBtn3) + + addSubview(nextBtnImageView2) + addSubview(nextBtn2) + + + + self.agreeLabel.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + } + + + // MARK: 모두 동의하기 + self.checkBox.snp.makeConstraints{ + $0.top.equalTo(agreeLabel.snp.bottom).offset(50) + $0.left.equalToSuperview().offset(20) + } + + self.allAgreeLabel.snp.makeConstraints{ + $0.top.equalTo(agreeLabel.snp.bottom).offset(55) + $0.left.equalTo(checkBox.snp.right).offset(20) + } + + self.lineImageView.snp.makeConstraints{ + $0.top.equalTo(checkBox.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + + // MARK: 텍스트 박스 + self.textboxView.snp.makeConstraints{ + $0.top.equalTo(lineImageView.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + $0.bottom.equalTo(nextBtnImageView2.snp.top).offset(-300) + } + + self.textboxContent.snp.makeConstraints{ + $0.top.equalTo(lineImageView.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(40) + $0.right.equalToSuperview().offset(-40) + $0.bottom.equalTo(nextBtnImageView2.snp.top).offset(-320) + } + + + // MARK: 마케팅정보 등의 체크박스 + self.checkBox2.snp.makeConstraints{ + $0.top.equalTo(textboxView.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + self.checkBox3.snp.makeConstraints{ + $0.top.equalTo(checkBox2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + self.checkBox4.snp.makeConstraints{ + $0.top.equalTo(checkBox3.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + + self.agreeBtn1.snp.makeConstraints{ + $0.top.equalTo(textboxView.snp.bottom).offset(35) + $0.left.equalTo(checkBox2.snp.right).offset(20) + } + + self.agreeBtn2.snp.makeConstraints{ + $0.top.equalTo(checkBox2.snp.bottom).offset(35) + $0.left.equalTo(checkBox3.snp.right).offset(20) + } + + self.agreeBtn3.snp.makeConstraints{ + $0.top.equalTo(checkBox3.snp.bottom).offset(35) + $0.left.equalTo(checkBox4.snp.right).offset(20) + } + + // MARK: 다음으로 버튼 + self.nextBtnImageView2.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + + self.nextBtn2.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView2).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + + + } + + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } + +} diff --git a/LGHTSG/LGHTSG/View/CheckView/CheckPageMarketingView.swift b/LGHTSG/LGHTSG/View/CheckView/CheckPageMarketingView.swift new file mode 100644 index 0000000..2b5c754 --- /dev/null +++ b/LGHTSG/LGHTSG/View/CheckView/CheckPageMarketingView.swift @@ -0,0 +1,97 @@ +// +// CheckPageMarketingView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPageMarketingView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar6 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView4 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + return image + }() + + let textContentLabel3 : UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem" + label.textColor = .white + label.numberOfLines = 0 + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView5 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel5 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.setTitleColor(.systemBlue, for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView4) + addSubview(textContentLabel3) + + addSubview(nextBtnImageView5) + addSubview(nextLabel5) + + self.textboxImageView4.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel3.snp.makeConstraints{ + $0.top.equalTo(textboxImageView4.snp.top).offset(20) + $0.left.equalTo(textboxImageView4.snp.left).offset(20) + $0.right.equalTo(textboxImageView4.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView4.snp.bottom).offset(-20) + } + + self.nextBtnImageView5.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel5.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView5).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/CheckView/CheckPagePrivacyView.swift b/LGHTSG/LGHTSG/View/CheckView/CheckPagePrivacyView.swift new file mode 100644 index 0000000..d4fa957 --- /dev/null +++ b/LGHTSG/LGHTSG/View/CheckView/CheckPagePrivacyView.swift @@ -0,0 +1,121 @@ +// +// CheckPagePrivacyView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPagePrivacyView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar5 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView3 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + return image + }() + + + //MARK: let scrollview + let scrollView2: UIScrollView = { + let scrollView = UIScrollView() + scrollView.translatesAutoresizingMaskIntoConstraints = false + scrollView.delaysContentTouches = true + scrollView.backgroundColor = .clear + return scrollView + }() + + + let scrollAddView2: UIView = { + let view = UIView() + return view + }() + + let textContentLabel2 : UILabel = { + let label = UILabel() + label.text = "< 라고할때살걸 >('https://api.lghtsg.site'이하 '라고할때살걸')은(는) 「개인정보 보호법」 제30조에 따라 정보주체의 개인정보를 보호하고 이와 관련한 고충을 신속하고 원활하게 처리할 수 있도록 하기 위하여 다음과 같이 개인정보 처리방침을 수립·공개합니다\n\n제1조(개인정보의 처리목적)\n< 라고할때살걸 >(이)가 개인정보 보호법 제32조에 따라 등록․공개하는 개인정보파일의 처리목적은 다음과 같습니다.\n\n1. 개인정보 파일명 : 라고할때살걸 사용자 정보\n개인정보의 처리목적 : 서비스 기능 제공을 위한 사용자 구분\n수집방법 : 앱\n보유근거 : 서비스 기능 제공을 위한 사용자 구분\n보유기간 : 1년\n관련법령 : 신용정보의 수집/처리 및 이용 등에 관한 기록 : 3년\n\n\n제2조(처리하는 개인정보의 항목)\n\n① < 라고할때살걸 >은(는) 다음의 개인정보 항목을 처리하고 있습니다.\n\n1< 라고할때살걸 사용자 정보 >\n필수항목 : 이메일, 비밀번호, 로그인ID, 이름, 서비스 이용 기록, 쿠키\n선택항목 :\n 1. 개인정보분쟁조정위원회 : (국번없이) 1833-6972 (www.kopico.go.kr)\n" + label.textColor = .white + label.numberOfLines = 0 + label.font = UIFont(name: "NanumSquareR", size: 13.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + // MARK: 다음으로 버튼 + let nextBtnImageView4 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel4 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.setTitleColor(.systemBlue, for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView3) + addSubview(textContentLabel2) + + textContentLabel2.addSubview(scrollView2) + + addSubview(nextBtnImageView4) + addSubview(nextLabel4) + + self.textboxImageView3.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel2.snp.makeConstraints{ + $0.top.equalTo(textboxImageView3.snp.top).offset(20) + $0.left.equalTo(textboxImageView3.snp.left).offset(20) + $0.right.equalTo(textboxImageView3.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView3.snp.bottom).offset(-20) + } + + self.nextBtnImageView4.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel4.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView4).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + + scrollView2.leadingAnchor.constraint(equalTo: textContentLabel2.leadingAnchor).isActive = true + scrollView2.trailingAnchor.constraint(equalTo: textContentLabel2.trailingAnchor).isActive = true + scrollView2.topAnchor.constraint(equalTo: textContentLabel2.bottomAnchor).isActive = true + scrollView2.bottomAnchor.constraint(equalTo: textContentLabel2.bottomAnchor).isActive = true + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/CheckView/CheckPageServiceView.swift b/LGHTSG/LGHTSG/View/CheckView/CheckPageServiceView.swift new file mode 100644 index 0000000..02dc539 --- /dev/null +++ b/LGHTSG/LGHTSG/View/CheckView/CheckPageServiceView.swift @@ -0,0 +1,101 @@ +// +// CheckPageServiceView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPageServiceView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar4 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView2 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + let textContentLabel : UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem" + label.textColor = .white + label.numberOfLines = 0 + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView3 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel3 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.setTitleColor(.systemBlue, for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView2) + addSubview(textContentLabel) + + addSubview(nextBtnImageView3) + addSubview(nextLabel3) + + self.textboxImageView2.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel.snp.makeConstraints{ + $0.top.equalTo(textboxImageView2.snp.top).offset(20) + $0.left.equalTo(textboxImageView2.snp.left).offset(20) + $0.right.equalTo(textboxImageView2.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView2.snp.bottom).offset(-20) + } + + + self.nextBtnImageView3.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel3.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView3).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + } + + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/FindPwView.swift b/LGHTSG/LGHTSG/View/FindPwView.swift new file mode 100644 index 0000000..26e7b5e --- /dev/null +++ b/LGHTSG/LGHTSG/View/FindPwView.swift @@ -0,0 +1,575 @@ +// +// FindPwView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire + +class FindPwView: UIView { + + + // MARK: 네비게이션 바 생성 + let navigationBar : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let emailSendImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "send-code-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let emailLabel: UILabel = { + let label = UILabel() + label.text = "인증번호를 요청할 이메일을 입력해주세요." + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let emailTextField2: UITextField = { + let label = UITextField() + label.becomeFirstResponder() // 첫번째 입력으로 인식 + label.attributedPlaceholder = NSAttributedString(string: "이메일", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + label.leftViewMode = .always + label.becomeFirstResponder() + label.textColor = .white + label.font = UIFont(name: "NanumSquareR", size: 15.0) + label.borderStyle = .none + label.enablesReturnKeyAutomatically = true + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + lazy var emailCodeBtn: UIButton = { + let btn = UIButton() + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 12.0) + //btn.backgroundColor = .red + btn.layer.cornerRadius = 5 + btn.layer.zPosition = 1000 + btn.addTarget(self, action: #selector(emailCodeBtnClicked), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let codeSendLabel: UILabel = { + let label = UILabel() + label.text = "인증번호가 발송되었습니다" + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let codeTextField: UITextField = { + let label = UITextField() + label.attributedPlaceholder = NSAttributedString(string: "인증번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + label.leftViewMode = .always + label.textColor = .white + label.font = UIFont(name: "NanumSquareR", size: 15.0) + label.borderStyle = .none + label.enablesReturnKeyAutomatically = true + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let codeSendImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "confirm-code-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + lazy var codeConfirmBtn: UIButton = { + let btn = UIButton() + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 12.0) + //btn.backgroundColor = .blue + btn.layer.cornerRadius = 5 + btn.translatesAutoresizingMaskIntoConstraints = false + btn.addTarget(self, action: #selector(codeConfirmBtnClicked), for: .touchUpInside) + return btn + }() + + + let codeConfirmLabel: UILabel = { + let label = UILabel() + label.text = "인증번호가 일치하지 않습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let passwordLabel: UILabel = { + let label = UILabel() + label.text = "변경할 비밀번호를 입력해주세요" + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let passwordTextField2: UITextField = { + let password = UITextField() + password.layer.cornerRadius = 5 + password.leftViewMode = .always + password.attributedPlaceholder = NSAttributedString(string: "비밀번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + password.borderStyle = .none + password.textColor = .white // 글자색을 흰색으로 + password.isSecureTextEntry = true + password.font = UIFont(name: "NanumSquareR", size: 15.0) + password.resignFirstResponder() + + password.addTarget(self, action: #selector(pwFieldEdited), for: UIControl.Event.editingChanged) + password.translatesAutoresizingMaskIntoConstraints = false + return password + }() + + let pwImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + let pwValidLabel: UILabel = { + let label = UILabel() + label.text = "영문, 숫자, 특수문자를 포함한 7자 이상으로 입력해주세요." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + + let passwordCheckTextField2: UITextField = { + let password = UITextField() + password.layer.cornerRadius = 5 + password.leftViewMode = .always + password.attributedPlaceholder = NSAttributedString(string: "비밀번호 확인", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + password.borderStyle = .none + password.textColor = .white // 글자색을 흰색으로 + password.isSecureTextEntry = true + password.font = UIFont(name: "NanumSquareR", size: 15.0) + password.resignFirstResponder() + password.addTarget(self, action: #selector(pwFieldEdited), for: UIControl.Event.editingChanged) + password.translatesAutoresizingMaskIntoConstraints = false + return password + }() + + let pwCheckImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + let pwSameLabel: UILabel = { + let label = UILabel() + label.text = "비밀번호가 일치하지 않습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let nextBtnImageView2 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let pwChangeBtn : UIButton = { + let label = UIButton() + label.setTitle("비밀번호 변경하기", for: .normal) + label.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + label.titleLabel?.textColor = .white + label.titleLabel?.textAlignment = .center + label.addTarget(self, action: #selector(changePwBtnClicked), for: .touchUpInside) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + + + let emailCode = emailApiModel() + var code : String = "dklsfjkljdlvnmnxlmnszlksjwr091u3tghjkfnm,gdsajlkfjsclxnm,zbghjkjilekdsfkhglksefmdfbjfo;gsdlfknjbldkgs" + + + // MARK: 인증번호 발송 함수 + @objc func emailCodeBtnClicked(){ + print("인증번호 발송버튼") + guard let email = emailTextField2.text else {return} + + let bodyData : Parameters = [ + "email" : email, + ] + + emailCode.requestEmailDataModel(bodyData: bodyData){ + data in + self.code = data.body + print(self.code) + } + sendCodeheight.isActive = false + } + + + // MARK: 인증번호 확인 함수 + @objc func codeConfirmBtnClicked(){ + if codeTextField.text == self.code { + codeConfirmheight.isActive = true + emailTextField2.isUserInteractionEnabled = false + codeTextField.isUserInteractionEnabled = false + showPwChange() + } + else { + codeConfirmheight.isActive = false + } + } + + // MARK: 패스워드 맞는지 확인하는 함수 + func isSamePassword(_ first: UITextField, _ second: UITextField) -> Bool { + if (first.text == second.text){ + return true + } + return false + } + + // MARK: 패스워드 유효한지 확인 함수 + func isValidPassword(pw: String?) -> Bool{ + + let regex = "^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[!@#$%^&*()_+=-]).{8,50}" + let predicate = NSPredicate(format: "SELF MATCHES %@", regex) + + if let hasPassword = pw{ + // 길이 확인 + if hasPassword.count > 7 && predicate.evaluate(with: hasPassword){ + print("패스워드 유효") + return true + } + } + return false + } + + + var isCheck1 : Bool = false + var isCheck2 : Bool = false + + // MARK: 패스워드의 결과에 따라 메세지를 보여줄지 여부를 정하는 코드 + @objc func pwFieldEdited(textField: UITextField) { + + if textField == passwordTextField2 { + if isValidPassword(pw: passwordTextField2.text) + { + print("유효함") + pwheight1.isActive = true + isCheck1 = true + } + else{ + print("유효하지않음") + pwheight1.isActive = false + isCheck1 = false + + } + } + + else if textField == passwordCheckTextField2 { + if isSamePassword(passwordTextField2, passwordCheckTextField2) + { + print("같음") + pwheight2.isActive = true + isCheck2 = true + } + else{ + print("다름") + pwheight2.isActive = false + isCheck2 = false + } + } + } + + + let changePw = ChangePwApiModel() + + + @objc func changePwBtnClicked(){ + print("isCheck1=\(isCheck1), isCheck2=\(isCheck2)") + if isCheck1 == true { + if isCheck2 == true { + print("비밀번호 변경 가능") + } + } + + guard let email = emailTextField2.text else {return} + guard let password = passwordTextField2.text else {return} + + + let bodyData : Parameters = [ + "email" : email, + "password" : password + ] + + changePw.requestChangeDataModel(bodyData: bodyData){ + data in + print(data.body) + } + } + + + // MARK: 인증번호 관련 동적 변화 라벨 + var sendCodeheight: NSLayoutConstraint! + var codeConfirmheight: NSLayoutConstraint! + + // MARK: 인증번호가 성공적이면 비밀번호 바꿀 수 있도록 함 + var codeSuccessheight: NSLayoutConstraint! + var codeSuccessheight1: NSLayoutConstraint! + var codeSuccessheight2: NSLayoutConstraint! + var codeSuccessheight3: NSLayoutConstraint! + var codeSuccessheight4: NSLayoutConstraint! + + + // MARK: 비밀번호에 따른 메세지 + var pwheight1: NSLayoutConstraint! + var pwheight2: NSLayoutConstraint! + + + func heightSetting(){ + + sendCodeheight = codeSendLabel.heightAnchor.constraint(equalToConstant: 0) + sendCodeheight.isActive = true + + codeConfirmheight = codeConfirmLabel.heightAnchor.constraint(equalToConstant: 0) + codeConfirmheight.isActive = true + + codeSuccessheight = passwordLabel.heightAnchor.constraint(equalToConstant: 0) + codeSuccessheight.isActive = true + + codeSuccessheight1 = pwImageView2.heightAnchor.constraint(equalToConstant: 0) + codeSuccessheight1.isActive = true + + codeSuccessheight2 = passwordTextField2.heightAnchor.constraint(equalToConstant: 0) + codeSuccessheight2.isActive = true + + codeSuccessheight3 = pwCheckImageView.heightAnchor.constraint(equalToConstant: 0) + codeSuccessheight3.isActive = true + + codeSuccessheight4 = passwordCheckTextField2.heightAnchor.constraint(equalToConstant: 0) + codeSuccessheight4.isActive = true + + pwheight1 = pwValidLabel.heightAnchor.constraint(equalToConstant: 0) + pwheight1.isActive = true + + pwheight2 = pwSameLabel.heightAnchor.constraint(equalToConstant: 0) + pwheight2.isActive = true + } + + + func showPwChange(){ + codeSuccessheight.isActive = false + codeSuccessheight1.isActive = false + codeSuccessheight2.isActive = false + codeSuccessheight3.isActive = false + codeSuccessheight4.isActive = false + } + + func highlightButton(){ + if isCheck1 == true && isCheck2 == true{ + pwChangeBtn.titleLabel?.textColor = .systemBlue + nextBtnImageView2.image = UIImage(named: "text-field") + } + + else{ + pwChangeBtn.titleLabel?.textColor = .white + nextBtnImageView2.image = UIImage(named: "highlight-btn") + } + + } + + + + + + override init(frame: CGRect) { + super.init(frame: frame) + + + heightSetting() + + addSubview(emailLabel) + addSubview(emailSendImageView) + addSubview(emailTextField2) + addSubview(codeSendLabel) + + addSubview(codeSendImageView) + addSubview(codeTextField) + addSubview(codeConfirmLabel) + + + addSubview(passwordLabel) + addSubview(pwImageView2) + addSubview(passwordTextField2) + + + addSubview(pwCheckImageView) + addSubview(passwordCheckTextField2) + addSubview(pwValidLabel) + + addSubview(nextBtnImageView2) + addSubview(pwChangeBtn) + addSubview(pwSameLabel) + + addSubview(emailCodeBtn) + addSubview(codeConfirmBtn) + + addSubview(codeConfirmBtn) + + + + self.emailLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(140) + $0.left.equalToSuperview().offset(20) + } + + // MARK: 이메일 작성 및 전송 버튼 위치 + self.emailSendImageView.snp.makeConstraints{ + $0.top.equalTo(emailLabel.snp.bottom).offset(30) + $0.centerX.equalToSuperview() + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.emailTextField2.snp.makeConstraints{ + $0.top.equalTo(emailLabel.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(28) + $0.right.equalToSuperview().offset(-120) + } + + self.emailCodeBtn.snp.makeConstraints{ + $0.top.equalTo(emailLabel.snp.bottom).offset(30) + $0.left.equalTo(emailTextField2.snp.right).offset(5) + $0.right.equalTo(emailSendImageView.snp.right) + $0.height.equalTo(emailSendImageView).offset(0) + } + + // MARK: 인증번호 보냈다는 메세지 띄움 + self.codeSendLabel.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView.snp.bottom).offset(5) + $0.left.equalTo(emailSendImageView.snp.left) + } + + + // MARK: 인증번호 작성 및 확인 버튼 위치 + self.codeSendImageView.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView.snp.bottom).offset(30) + $0.centerX.equalToSuperview() + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.codeTextField.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(28) + $0.right.equalToSuperview().offset(-120) + } + + + self.codeConfirmBtn.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView.snp.bottom).offset(30) + $0.left.equalTo(codeTextField.snp.right).offset(5) + $0.height.equalTo(codeSendImageView).offset(0) + $0.right.equalTo(codeSendImageView.snp.right) + } + + + // MARK: 인증번호가 다르다는 메세지를 띄움 + self.codeConfirmLabel.snp.makeConstraints{ + $0.top.equalTo(codeSendImageView.snp.bottom).offset(5) + $0.left.equalTo(codeSendImageView.snp.left) + } + + + // MARK: 비밀번호 변경 파트 + self.passwordLabel.snp.makeConstraints{ + $0.top.equalTo(codeSendImageView.snp.bottom).offset(100) + $0.left.equalToSuperview().offset(20) + } + + // MARK: 패스워드 변경 위치 + self.pwImageView2.snp.makeConstraints{ + $0.top.equalTo(passwordLabel.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.passwordTextField2.snp.makeConstraints{ + $0.top.equalTo(passwordLabel.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(28) + $0.right.equalToSuperview().offset(-20) + } + + self.pwValidLabel.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(5) + $0.left.equalTo(pwImageView2.snp.left) + } + + + // MARK: 비밀번호 체크 + self.pwCheckImageView.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + self.passwordCheckTextField2.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(28) + $0.right.equalToSuperview().offset(-20) + } + + + // MARK: 비밀번호 같은지 체크 + self.pwSameLabel.snp.makeConstraints{ + $0.top.equalTo(pwCheckImageView.snp.bottom).offset(5) + $0.left.equalTo(pwCheckImageView.snp.left) + + } + + + // MARK: 비밀번호 변경 버튼 + self.nextBtnImageView2.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-50) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.pwChangeBtn.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView2).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + } + + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } + +} diff --git a/LGHTSG/LGHTSG/View/LoginView.swift b/LGHTSG/LGHTSG/View/LoginView.swift new file mode 100644 index 0000000..af66a67 --- /dev/null +++ b/LGHTSG/LGHTSG/View/LoginView.swift @@ -0,0 +1,359 @@ +// +// LoginView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import SnapKit +import Alamofire + +<<<<<<< Updated upstream +class LoginView: UIView { +======= +class LoginView: UIViewController { +>>>>>>> Stashed changes + + let titleImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "icon") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let privacyPolicyLabel: UILabel = { + let label = UILabel() + label.text = "개인정보처리방침" + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 13.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let memberInquiryLabel: UILabel = { + let label = UILabel() + label.text = "회원 정보 문의 : admin@rghtsg.com" + label.textColor = .lightGray + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let emailTextField: UITextField = { + let email = UITextField() + email.layer.cornerRadius = 5 + email.leftViewMode = .always + email.attributedPlaceholder = NSAttributedString(string: "이메일", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + email.textColor = .white + email.font = UIFont(name: "NanumSquareR", size: 15.0) + email.borderStyle = .none + email.enablesReturnKeyAutomatically = true + email.translatesAutoresizingMaskIntoConstraints = false + return email + }() + + + let passwordTextField: UITextField = { + let password = UITextField() + password.layer.cornerRadius = 5 + password.leftViewMode = .always + password.attributedPlaceholder = NSAttributedString(string: "비밀번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + password.borderStyle = .none + password.textColor = .white // 글자색을 흰색으로 + password.isSecureTextEntry = true + password.font = UIFont(name: "NanumSquareR", size: 15.0) + password.translatesAutoresizingMaskIntoConstraints = false + return password + }() + + let emailImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let pwImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let loginBtn2: UIButton = { + let btn = UIButton() + btn.setBackgroundImage(UIImage(named: "login-btn2"), for: .normal) + //btn.addTarget(self, action: #selector(loginBtnClicked2), for: .touchUpInside) + btn.addTarget(self, action: #selector(loginBtnClicked), for: .touchUpInside) + + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let joinBtn2: UIButton = { + let btn = UIButton() + btn.setTitle("회원가입", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let findPwBtn2: UIButton = { + let btn = UIButton() + btn.setTitle("비밀번호 찾기", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let middleLabel2: UILabel = { + let label = UILabel() + label.text = "|" + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textAlignment = .center + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + +<<<<<<< Updated upstream +======= + let loginWrongLabel: UILabel = { + let label = UILabel() + label.text = "없는 아이디거나 비밀번호가 틀렸습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() +>>>>>>> Stashed changes + + + let login = LoginApiModel() + let loginMsgCode = LoginApiHeaderModel() + var jwt : String = "" + var msgCode : Int = 0 + var result = LoginResult(jwt: "") + + @objc func loginBtnClicked(){ + + guard let email = emailTextField.text else {return} + guard let password = passwordTextField.text else {return} + + + let bodyData : Parameters = [ + "email" : email, + "password" : password + ] + + login.requestLoginDataModel(bodyData: bodyData){ + data in + self.jwt = data.jwt + print(data) +<<<<<<< Updated upstream + print(data.jwt) + } + + loginMsgCode.requestLoginDataModel(bodyData: bodyData){ + data in + self.msgCode = data.resultCode + print(data) + } + +======= + } + + /* + loginMsgCode.requestLoginDataModel(bodyData: bodyData){ + data in + print(data) + } + */ + + var loginSuccess = UserDefaults.standard.bool(forKey: "loginSuccess") + loginSuccess = UserDefaults.standard.bool(forKey: "loginSuccess") + print(loginSuccess) + + + if jwt == "" { + print("로그인안됨") + loginWrongheight.isActive = false + } + else { + loginWrongheight.isActive = true + } + +>>>>>>> Stashed changes + //UserDefaults.standard.set(emailTextField.text, forKey: "id") + //UserDefaults.standard.set(passwordTextField.text, forKey: "pw") + + + } +<<<<<<< Updated upstream + + + + + override init(frame: CGRect) { + super.init(frame: frame) + + addSubview(titleImageView2) + + addSubview(emailImageView) + addSubview(emailTextField) + + addSubview(pwImageView) + addSubview(passwordTextField) + + addSubview(loginBtn2) + addSubview(joinBtn2) + addSubview(middleLabel2) + addSubview(findPwBtn2) +======= + + + // MARK: 로그인 관련 동적라벨 + var loginWrongheight: NSLayoutConstraint! + + + + + + override func viewDidLoad() { + + loginWrongheight = loginWrongLabel.heightAnchor.constraint(equalToConstant: 0) + loginWrongheight.isActive = true + + view.addSubview(titleImageView2) + + view.addSubview(emailImageView) + view.addSubview(emailTextField) + + view.addSubview(pwImageView) + view.addSubview(passwordTextField) + view.addSubview(loginWrongLabel) + + view.addSubview(loginBtn2) + view.addSubview(joinBtn2) + view.addSubview(middleLabel2) + view.addSubview(findPwBtn2) +>>>>>>> Stashed changes + + + //view.addSubview(pwChangeBtn) + //view.addSubview(middleLabel) + //view.addSubview(joinBtn) + + //view.addSubview(errorEmailLabel) + //view.addSubview(errorPwLabel) + +<<<<<<< Updated upstream + addSubview(privacyPolicyLabel) + addSubview(memberInquiryLabel) +======= + view.addSubview(privacyPolicyLabel) + view.addSubview(memberInquiryLabel) +>>>>>>> Stashed changes + + + // MARK: 맨 위 이미지 위치 + self.titleImageView2.snp.makeConstraints { + $0.top.equalToSuperview().offset(170) + $0.centerX.equalToSuperview() + } + + self.emailImageView.snp.makeConstraints { + $0.top.equalTo(titleImageView2.snp.bottom).offset(100) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + self.emailTextField.snp.makeConstraints { + $0.top.equalTo(titleImageView2.snp.bottom).offset(115) + $0.left.equalToSuperview().offset(50) + $0.right.equalToSuperview().offset(-30) + } + + + + // MARK: 비밀번호 위치 및 배경 + // 나중에 에러 메세지 위치랑 고려해서 바꿔야함 + self.pwImageView.snp.makeConstraints { + $0.top.equalTo(emailImageView.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + self.passwordTextField.snp.makeConstraints { + $0.top.equalTo(emailImageView.snp.bottom).offset(35) + $0.left.equalToSuperview().offset(50) + $0.right.equalToSuperview().offset(-30) + } + +<<<<<<< Updated upstream + + // MARK: 로그인 버튼 + self.loginBtn2.snp.makeConstraints { + $0.top.equalTo(pwImageView.snp.bottom).offset(20) +======= + self.loginWrongLabel.snp.makeConstraints{ + $0.top.equalTo(pwImageView.snp.bottom).offset(5) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + // MARK: 로그인 버튼 + self.loginBtn2.snp.makeConstraints { + $0.top.equalTo(pwImageView.snp.bottom).offset(40) +>>>>>>> Stashed changes + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + // MARK: 회원가입 및 비밀번호 찾기 + self.middleLabel2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(25) + $0.centerX.equalTo(loginBtn2) + } + + self.joinBtn2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(20) + $0.right.equalTo(middleLabel2.snp.left).offset(-20) + } + + + self.findPwBtn2.snp.makeConstraints{ + $0.top.equalTo(loginBtn2.snp.bottom).offset(20) + $0.left.equalTo(middleLabel2.snp.right).offset(20) + } + + + // MARK: 맨 밑 글자 위치 + self.memberInquiryLabel.snp.makeConstraints{ + $0.centerX.equalToSuperview() + $0.top.equalTo(privacyPolicyLabel.snp.bottom).offset(5) + } + + self.privacyPolicyLabel.snp.makeConstraints{ + $0.centerX.equalToSuperview() + $0.bottom.equalToSuperview().offset(-100) + + } + + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } + +} diff --git "a/LGHTSG/LGHTSG/View/MyPageView \353\263\265\354\202\254\353\263\270.swift" "b/LGHTSG/LGHTSG/View/MyPageView \353\263\265\354\202\254\353\263\270.swift" new file mode 100644 index 0000000..9d8cfbe --- /dev/null +++ "b/LGHTSG/LGHTSG/View/MyPageView \353\263\265\354\202\254\353\263\270.swift" @@ -0,0 +1,22 @@ +// +// MyPageView.swift +// LGHTSG + + +import Foundation +import UIKit +import Alamofire +import SnapKit + + +class MyPageView : UIView { + + override init(frame: CGRect) { + + super.init(frame: frame) + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/MyPageView.swift b/LGHTSG/LGHTSG/View/MyPageView.swift new file mode 100644 index 0000000..5dad76e --- /dev/null +++ b/LGHTSG/LGHTSG/View/MyPageView.swift @@ -0,0 +1,112 @@ +// +// MyPageView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/26. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class MyPageView : UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar7 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + +<<<<<<< Updated upstream + + override init(frame: CGRect) { + + super.init(frame: frame) + + } +======= + var profileImageView2 : UIImageView = { + let image = UIImageView() + image.layer.cornerRadius = image.frame.height/2 + image.layer.borderWidth = 1 + image.layer.masksToBounds = true + image.contentMode = .scaleToFill + image.layer.borderColor = UIColor.clear.cgColor // 원형 이미지의 테두리 제거 + image.clipsToBounds = true + image.image = UIImage(named: "profile") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let button1 : UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "mypage1"), for: .normal) + return btn + }() + + let button2 : UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "mypage2"), for: .normal) + return btn + }() + + let button3 : UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "mypage3"), for: .normal) + return btn + }() + + let logoutBtn : UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "logout-btn"), for: .normal) + return btn + }() + + + + override init(frame: CGRect) { + super.init(frame: frame) + + addSubview(profileImageView2) + addSubview(button1) + addSubview(button2) + addSubview(button3) + addSubview(logoutBtn) + + let logoutLine = UnderlineView() + addSubview(logoutLine) + + self.profileImageView2.snp.makeConstraints { + $0.top.equalToSuperview().offset(100) + $0.centerX.equalToSuperview() + } + + self.button1.snp.makeConstraints { + $0.top.equalTo(profileImageView2.snp.bottom).offset(50) + $0.centerX.equalToSuperview() + } + + self.button2.snp.makeConstraints { + $0.top.equalTo(button1.snp.bottom).offset(10) + $0.centerX.equalToSuperview() + } + + self.button3.snp.makeConstraints { + $0.top.equalTo(button2.snp.bottom).offset(10) + $0.centerX.equalToSuperview() + } + + self.logoutBtn.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-50) + $0.centerX.equalToSuperview() + } + } + +>>>>>>> Stashed changes + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/New Group1/HomeTableCell.swift b/LGHTSG/LGHTSG/View/New Group1/HomeTableCell.swift new file mode 100644 index 0000000..21f2f87 --- /dev/null +++ b/LGHTSG/LGHTSG/View/New Group1/HomeTableCell.swift @@ -0,0 +1,189 @@ +// +// HomeTableCell.swift +// LGHTSG +// +// Created by SunHo Lee on 2023/01/14. +// + +import Foundation +import UIKit +import SnapKit +import Kingfisher +class HomeTableCell : UITableViewCell { + + var countLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 16, weight: .bold) + label.textColor = .white + return label + }() + private lazy var nameLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 14, weight: .semibold) + label.textColor = .white + return label + }() + private lazy var priceLabel : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 14, weight: .medium) + label.textColor = UIColor.systemGray + return label + }() + private lazy var pricePercent : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight: .medium) + label.textColor = UIColor.red + return label + }() + private lazy var changeDate : UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 12, weight : .medium) + label.textColor = UIColor.systemGray + return label + }() + var iconimage = UIImageView() +// override func layoutSubviews() { +// super.layoutSubviews() +// contentView.frame = contentView.frame.inset(by: UIEdgeInsets(top: 12, left: 0, bottom: 12, right: 0)) +// } +} +extension HomeTableCell { + func setup(with assetinfo : asset.body){ + [countLabel, nameLabel, priceLabel, pricePercent, changeDate, iconimage].forEach{ + addSubview($0) + } + + nameLabel.text = assetinfo.name + priceLabel.text = String(assetinfo.price)+"원" + changeDate.text = assetinfo.rateCalDateDiff + let stringofratechange = String(assetinfo.rateOfChange) + if(stringofratechange[stringofratechange.startIndex] == "-"){ + pricePercent.text = "\(stringofratechange)%" + pricePercent.textColor = .blue + }else { + pricePercent.text = "+\(stringofratechange)%" + pricePercent.textColor = .red + } + let url = URL(string: assetinfo.iconImage) + iconimage.clipsToBounds = true + iconimage.kf.setImage(with: url) + countLabel.snp.makeConstraints{ + $0.leading.equalToSuperview() + $0.top.equalToSuperview() + $0.bottom.equalToSuperview().offset(-12) + } + iconimage.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(23.66) + $0.top.equalToSuperview() + $0.height.width.equalTo(44) + $0.bottom.equalToSuperview().offset(-12) + } + nameLabel.snp.makeConstraints{ + $0.leading.equalTo(iconimage.snp.trailing).offset(16.34) + $0.top.equalToSuperview() + + } + priceLabel.snp.makeConstraints{ + $0.leading.equalTo(nameLabel.snp.leading) + $0.top.equalTo(nameLabel.snp.bottom).offset(5) + } + pricePercent.snp.makeConstraints{ + $0.leading.equalTo(priceLabel.snp.trailing).offset(8) + $0.top.equalTo(priceLabel.snp.top) + } + changeDate.snp.makeConstraints{ + $0.leading.equalTo(pricePercent.snp.trailing).offset(9) + $0.top.equalTo(pricePercent.snp.top) + } + } + func setup(with resellinfo : ResellPrice.body){ + [countLabel, nameLabel, priceLabel, pricePercent, changeDate, iconimage].forEach{ + addSubview($0) + } + nameLabel.text = resellinfo.name + priceLabel.text = String(resellinfo.price)+"원" + changeDate.text = resellinfo.rateCalDateDiff + let stringofratechange = String( resellinfo.rateOfChange) + if(stringofratechange[stringofratechange.startIndex] == "-"){ + pricePercent.text = "\(stringofratechange)%" + pricePercent.textColor = .blue + }else { + pricePercent.text = "+\(stringofratechange)%" + pricePercent.textColor = .red + } + + let url = URL(string: resellinfo.imageUrl) + // kf 이미지 둥그렇게 + + iconimage.clipsToBounds = true + iconimage.layer.cornerRadius = 20 + iconimage.backgroundColor = .white + iconimage.kf.setImage(with: url ) + + countLabel.snp.makeConstraints{ + $0.leading.equalToSuperview() + $0.top.equalToSuperview() + $0.bottom.equalToSuperview().offset(-12) + } + iconimage.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(23.66) + $0.top.equalToSuperview() + $0.height.width.equalTo(44) + $0.bottom.equalToSuperview().offset(-12) + } + nameLabel.snp.makeConstraints{ + $0.leading.equalTo(iconimage.snp.trailing).offset(16.34) + $0.top.equalToSuperview() + + } + priceLabel.snp.makeConstraints{ + $0.leading.equalTo(nameLabel.snp.leading) + $0.top.equalTo(nameLabel.snp.bottom).offset(5) + } + pricePercent.snp.makeConstraints{ + $0.leading.equalTo(priceLabel.snp.trailing).offset(8) + $0.top.equalTo(priceLabel.snp.top) + } + changeDate.snp.makeConstraints{ + $0.leading.equalTo(pricePercent.snp.trailing).offset(9) + $0.top.equalTo(pricePercent.snp.top) + } + } + func setuppp(){ + [countLabel, nameLabel, priceLabel, pricePercent, changeDate, iconimage].forEach{ + addSubview($0) + } + nameLabel.text = "서울특별시 강남구 논현동 동현아파트" + priceLabel.text = "22,303,921원/m2" + changeDate.text = "3달전 대비" + pricePercent.text = "+3.0%" + iconimage.image = UIImage(systemName: "star") + countLabel.snp.makeConstraints{ + $0.leading.equalToSuperview() + $0.top.equalToSuperview() + $0.bottom.equalToSuperview().offset(-12) + } + iconimage.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(23.66) + $0.top.equalToSuperview() + $0.bottom.equalToSuperview().offset(-12) + } + nameLabel.snp.makeConstraints{ + $0.leading.equalTo(iconimage.snp.trailing).offset(16.34) + $0.top.equalToSuperview() + + } + priceLabel.snp.makeConstraints{ + $0.leading.equalTo(nameLabel.snp.leading) + $0.top.equalTo(nameLabel.snp.bottom).offset(5) + } + pricePercent.snp.makeConstraints{ + $0.leading.equalTo(priceLabel.snp.trailing).offset(8) + $0.top.equalTo(priceLabel.snp.top) + } + changeDate.snp.makeConstraints{ + $0.leading.equalTo(pricePercent.snp.trailing).offset(9) + $0.top.equalTo(pricePercent.snp.top) + } + } +} diff --git a/LGHTSG/LGHTSG/View/StartView.swift b/LGHTSG/LGHTSG/View/StartView.swift new file mode 100644 index 0000000..c32e1ab --- /dev/null +++ b/LGHTSG/LGHTSG/View/StartView.swift @@ -0,0 +1,145 @@ + + +import Foundation +import UIKit +import SnapKit +import Alamofire + +class StartView: UIView { + + let titleImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "icon") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let loginBtn: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "login-btn"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let joinBtn: UIButton = { + let btn = UIButton() + btn.setTitle("회원가입", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let findPwBtn: UIButton = { + let btn = UIButton() + btn.setTitle("비밀번호 찾기", for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareR", size: 12.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let middleLabel: UILabel = { + let label = UILabel() + label.text = "|" + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textAlignment = .center + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + let kakaoLoginline: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "login-line") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + // MARK: 카카오 로그인 버튼 생성 + let kakaoLoginBtn: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "kakaoLogin"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + + override init(frame: CGRect) { + super.init(frame: frame) + + addSubview(titleImageView) + + addSubview(loginBtn) + + addSubview(joinBtn) + addSubview(middleLabel) + addSubview(findPwBtn) + + addSubview(kakaoLoginline) + addSubview(kakaoLoginBtn) + + + // MARK: 맨 위 이미지 위치 + self.titleImageView.snp.makeConstraints { + $0.top.equalToSuperview().offset(170) + $0.centerX.equalToSuperview() + } + + + + // MARK: 로그인 버튼 + self.loginBtn.snp.makeConstraints { + $0.top.equalTo(titleImageView.snp.bottom).offset(80) + $0.centerX.equalToSuperview() + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + // MARK: 회원가입 및 비밀번호 찾기 + self.middleLabel.snp.makeConstraints{ + $0.top.equalTo(loginBtn.snp.bottom).offset(15) + $0.centerX.equalTo(loginBtn) + } + + self.joinBtn.snp.makeConstraints{ + $0.top.equalTo(loginBtn.snp.bottom).offset(8) + $0.right.equalTo(middleLabel.snp.left).offset(-20) + } + + + self.findPwBtn.snp.makeConstraints{ + $0.top.equalTo(loginBtn.snp.bottom).offset(8) + $0.left.equalTo(middleLabel.snp.right).offset(20) + } + + + // MARK: 카카오 로그인 버튼 및 라인 위치 + self.kakaoLoginline.snp.makeConstraints{ + $0.top.equalTo(joinBtn.snp.bottom).offset(180) + $0.centerX.equalToSuperview() + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + self.kakaoLoginBtn.snp.makeConstraints{ + $0.top.equalTo(kakaoLoginline.snp.bottom).offset(20) + $0.centerX.equalToSuperview() + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-30) + } + + + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } + +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckAgreeView.swift b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckAgreeView.swift new file mode 100644 index 0000000..efc76de --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckAgreeView.swift @@ -0,0 +1,441 @@ +// +// CheckAgreeView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckAgreeView: UIView { + + + var allChecked:Bool = false + var isChecked:Bool = false + var isChecked2:Bool = false + var isChecked3:Bool = false + var isChecked4:Bool = false + + + // MARK: 네비게이션 바 생성 + let navigationBar3 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + + let lineImageView : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "line") + return image + }() + + + let agreeLabel : UILabel = { + let label = UILabel() + label.text = "약관 동의" + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 18.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let allAgreeLabel : UILabel = { + let label = UILabel() + label.text = "모두 동의하기" + label.textColor = .white + label.font = UIFont(name: "NanumSquareR", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + // MARK: 체크박스 + let checkBox: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let checkBox2: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked2), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let checkBox3: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked3), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + let checkBox4: UIButton = { + let btn = UIButton() + btn.setImage(UIImage(named: "not-check-box"), for: .normal) + btn.heightAnchor.constraint(equalToConstant: 30).isActive = true + btn.widthAnchor.constraint(equalToConstant: 30).isActive = true + btn.addTarget(self, action: #selector(buttonClicked4), for: .touchUpInside) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 텍스트 상자 + let textboxView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-box") + return image + }() + + let textboxContent: UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem " + label.numberOfLines = 0 + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 각 이용약관 동의버튼 + let agreeBtn1: UIButton = { + let btn = UIButton() + btn.backgroundColor = .black + btn.setImage(UIImage(named: "서비스 이용약관"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let agreeBtn2: UIButton = { + let btn = UIButton() + btn.backgroundColor = .clear + btn.setImage(UIImage(named: "개인정보 처리방침"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + let agreeBtn3: UIButton = { + let btn = UIButton() + btn.backgroundColor = .clear + btn.setImage(UIImage(named: "마케팅 정보"), for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView2 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextBtn2 : UIButton = { + let btn = UIButton() + btn.setTitle("다음으로", for: .normal) + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.titleLabel?.textColor = .white + btn.titleLabel?.textAlignment = .center + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + + // MARK: 버튼 관련 함수 + @objc func buttonClicked(button:UIButton){ + + print("buttonClicked") + + // MARK: 클릭했는데 그 전에 클릭된 것이 없다면 + if allChecked == false { + checkBox.setImage(UIImage(named: "check-box"), for: .normal) + checkBox2.setImage(UIImage(named: "check-box"), for: .normal) + checkBox3.setImage(UIImage(named: "check-box"), for: .normal) + checkBox4.setImage(UIImage(named: "check-box"), for: .normal) + + // MARK: 다 체크되었다는 뜻으로 true로 설정 + isChecked = true + isChecked2 = true + isChecked3 = true + isChecked4 = true + allChecked = true + + // MARK: true 값을 넣어준다. + UserDefaults.standard.set(allChecked, forKey: "allcheck") + UserDefaults.standard.set(isChecked2, forKey: "check1") + UserDefaults.standard.set(isChecked3, forKey: "check2") + UserDefaults.standard.set(isChecked4, forKey: "check3") + + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + + } + else + { + checkBox.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox2.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox3.setImage(UIImage(named: "not-check-box"), for: .normal) + checkBox4.setImage(UIImage(named: "not-check-box"), for: .normal) + + isChecked = false + isChecked2 = false + isChecked3 = false + isChecked4 = false + allChecked = false + UserDefaults.standard.set(allChecked, forKey: "allcheck") + UserDefaults.standard.set(isChecked2, forKey: "check1") + UserDefaults.standard.set(isChecked3, forKey: "check2") + UserDefaults.standard.set(isChecked4, forKey: "check3") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + + } + + + @objc func buttonClicked2(button:UIButton){ + + if isChecked2 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + } + + if isChecked2 == true{ + isChecked2 = false + UserDefaults.standard.set(isChecked2, forKey: "check1") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked2 = true + UserDefaults.standard.set(isChecked2, forKey: "check1") + + // MARK: 두 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked3 == true && isChecked4 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + } + } + + + + + + + @objc func buttonClicked3(button:UIButton){ + + if isChecked3 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + } + + if isChecked3 == true{ + isChecked3 = false + UserDefaults.standard.set(isChecked3, forKey: "check2") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked3 = true + UserDefaults.standard.set(isChecked3, forKey: "check2") + + // MARK: 세 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked2 == true && isChecked4 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + } + + } + + @objc func buttonClicked4(button:UIButton){ + + if isChecked4 == false{ + button.setImage(UIImage(named: "check-box"), for: .normal) + //check2height.isActive = true + } + else{ + button.setImage(UIImage(named: "not-check-box"), for: .normal) + // check2height.isActive = false + } + + if isChecked4 == true{ + isChecked4 = false + UserDefaults.standard.set(isChecked4, forKey: "check3") + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + else{ + isChecked4 = true + UserDefaults.standard.set(isChecked4, forKey: "check3") + + // MARK: 네 번째 체크박스는 이미 눌려져있으니 논 외로, 그 외에 다 체크되었는지 + if isChecked2 == true && isChecked3 == true{ + nextBtnImageView2.image = UIImage(named: "highlight-btn") + nextBtn2.titleLabel?.textColor = .systemBlue + } + else { + nextBtnImageView2.image = UIImage(named: "text-field") + nextBtn2.titleLabel?.textColor = .white + } + + } + } + + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(agreeLabel) + + + addSubview(lineImageView) + addSubview(allAgreeLabel) + addSubview(checkBox) + + + addSubview(textboxView) + addSubview(textboxContent) + + addSubview(checkBox2) + addSubview(checkBox3) + addSubview(checkBox4) + + addSubview(agreeBtn1) + addSubview(agreeBtn2) + addSubview(agreeBtn3) + + addSubview(nextBtnImageView2) + addSubview(nextBtn2) + + + + self.agreeLabel.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + } + + + // MARK: 모두 동의하기 + self.checkBox.snp.makeConstraints{ + $0.top.equalTo(agreeLabel.snp.bottom).offset(50) + $0.left.equalToSuperview().offset(20) + } + + self.allAgreeLabel.snp.makeConstraints{ + $0.top.equalTo(agreeLabel.snp.bottom).offset(55) + $0.left.equalTo(checkBox.snp.right).offset(20) + } + + self.lineImageView.snp.makeConstraints{ + $0.top.equalTo(checkBox.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + + // MARK: 텍스트 박스 + self.textboxView.snp.makeConstraints{ + $0.top.equalTo(lineImageView.snp.bottom).offset(20) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + $0.bottom.equalTo(nextBtnImageView2.snp.top).offset(-300) + } + + self.textboxContent.snp.makeConstraints{ + $0.top.equalTo(lineImageView.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(40) + $0.right.equalToSuperview().offset(-40) + $0.bottom.equalTo(nextBtnImageView2.snp.top).offset(-320) + } + + + // MARK: 마케팅정보 등의 체크박스 + self.checkBox2.snp.makeConstraints{ + $0.top.equalTo(textboxView.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + self.checkBox3.snp.makeConstraints{ + $0.top.equalTo(checkBox2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + self.checkBox4.snp.makeConstraints{ + $0.top.equalTo(checkBox3.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + } + + + self.agreeBtn1.snp.makeConstraints{ + $0.top.equalTo(textboxView.snp.bottom).offset(35) + $0.left.equalTo(checkBox2.snp.right).offset(20) + } + + self.agreeBtn2.snp.makeConstraints{ + $0.top.equalTo(checkBox2.snp.bottom).offset(35) + $0.left.equalTo(checkBox3.snp.right).offset(20) + } + + self.agreeBtn3.snp.makeConstraints{ + $0.top.equalTo(checkBox3.snp.bottom).offset(35) + $0.left.equalTo(checkBox4.snp.right).offset(20) + } + + // MARK: 다음으로 버튼 + self.nextBtnImageView2.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + + self.nextBtn2.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView2).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + + + } + + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } + +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageMarketingView.swift b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageMarketingView.swift new file mode 100644 index 0000000..2b5c754 --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageMarketingView.swift @@ -0,0 +1,97 @@ +// +// CheckPageMarketingView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPageMarketingView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar6 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView4 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + return image + }() + + let textContentLabel3 : UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem" + label.textColor = .white + label.numberOfLines = 0 + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView5 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel5 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.setTitleColor(.systemBlue, for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView4) + addSubview(textContentLabel3) + + addSubview(nextBtnImageView5) + addSubview(nextLabel5) + + self.textboxImageView4.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel3.snp.makeConstraints{ + $0.top.equalTo(textboxImageView4.snp.top).offset(20) + $0.left.equalTo(textboxImageView4.snp.left).offset(20) + $0.right.equalTo(textboxImageView4.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView4.snp.bottom).offset(-20) + } + + self.nextBtnImageView5.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel5.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView5).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPagePrivacyView.swift b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPagePrivacyView.swift new file mode 100644 index 0000000..d4fa957 --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPagePrivacyView.swift @@ -0,0 +1,121 @@ +// +// CheckPagePrivacyView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPagePrivacyView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar5 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView3 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + return image + }() + + + //MARK: let scrollview + let scrollView2: UIScrollView = { + let scrollView = UIScrollView() + scrollView.translatesAutoresizingMaskIntoConstraints = false + scrollView.delaysContentTouches = true + scrollView.backgroundColor = .clear + return scrollView + }() + + + let scrollAddView2: UIView = { + let view = UIView() + return view + }() + + let textContentLabel2 : UILabel = { + let label = UILabel() + label.text = "< 라고할때살걸 >('https://api.lghtsg.site'이하 '라고할때살걸')은(는) 「개인정보 보호법」 제30조에 따라 정보주체의 개인정보를 보호하고 이와 관련한 고충을 신속하고 원활하게 처리할 수 있도록 하기 위하여 다음과 같이 개인정보 처리방침을 수립·공개합니다\n\n제1조(개인정보의 처리목적)\n< 라고할때살걸 >(이)가 개인정보 보호법 제32조에 따라 등록․공개하는 개인정보파일의 처리목적은 다음과 같습니다.\n\n1. 개인정보 파일명 : 라고할때살걸 사용자 정보\n개인정보의 처리목적 : 서비스 기능 제공을 위한 사용자 구분\n수집방법 : 앱\n보유근거 : 서비스 기능 제공을 위한 사용자 구분\n보유기간 : 1년\n관련법령 : 신용정보의 수집/처리 및 이용 등에 관한 기록 : 3년\n\n\n제2조(처리하는 개인정보의 항목)\n\n① < 라고할때살걸 >은(는) 다음의 개인정보 항목을 처리하고 있습니다.\n\n1< 라고할때살걸 사용자 정보 >\n필수항목 : 이메일, 비밀번호, 로그인ID, 이름, 서비스 이용 기록, 쿠키\n선택항목 :\n 1. 개인정보분쟁조정위원회 : (국번없이) 1833-6972 (www.kopico.go.kr)\n" + label.textColor = .white + label.numberOfLines = 0 + label.font = UIFont(name: "NanumSquareR", size: 13.0) + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + // MARK: 다음으로 버튼 + let nextBtnImageView4 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel4 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.setTitleColor(.systemBlue, for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView3) + addSubview(textContentLabel2) + + textContentLabel2.addSubview(scrollView2) + + addSubview(nextBtnImageView4) + addSubview(nextLabel4) + + self.textboxImageView3.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel2.snp.makeConstraints{ + $0.top.equalTo(textboxImageView3.snp.top).offset(20) + $0.left.equalTo(textboxImageView3.snp.left).offset(20) + $0.right.equalTo(textboxImageView3.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView3.snp.bottom).offset(-20) + } + + self.nextBtnImageView4.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel4.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView4).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + + scrollView2.leadingAnchor.constraint(equalTo: textContentLabel2.leadingAnchor).isActive = true + scrollView2.trailingAnchor.constraint(equalTo: textContentLabel2.trailingAnchor).isActive = true + scrollView2.topAnchor.constraint(equalTo: textContentLabel2.bottomAnchor).isActive = true + scrollView2.bottomAnchor.constraint(equalTo: textContentLabel2.bottomAnchor).isActive = true + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageServiceView.swift b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageServiceView.swift new file mode 100644 index 0000000..02dc539 --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/CheckView/CheckPageServiceView.swift @@ -0,0 +1,101 @@ +// +// CheckPageServiceView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class CheckPageServiceView: UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar4 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + let textboxImageView2 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-long-box") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + let textContentLabel : UILabel = { + let label = UILabel() + label.text = "met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem met,consecondimentum. Integer rhoncus ctetur adipiscing elit. Donec blandit egestas neque, id iaculis ex cursus et. In hac habitasse platea dictumst. Phasellus vel facilisis nisi, et convallis erat. Vivamus ultrices tellus massa, id laoreet neque elementum vitae. Vestibulum ultrices, mauris sit amet pretium volutpat, lorem enim ornare felis, in congue lacus sem" + label.textColor = .white + label.numberOfLines = 0 + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 다음으로 버튼 + let nextBtnImageView3 : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "highlight-btn") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let nextLabel3 : UIButton = { + let btn = UIButton() + btn.setTitle("동의하기", for: .normal) + btn.titleLabel?.textAlignment = .center + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + btn.setTitleColor(.systemBlue, for: .normal) + btn.translatesAutoresizingMaskIntoConstraints = false + return btn + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(textboxImageView2) + addSubview(textContentLabel) + + addSubview(nextBtnImageView3) + addSubview(nextLabel3) + + self.textboxImageView2.snp.makeConstraints{ + $0.top.equalToSuperview().offset(80) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.textContentLabel.snp.makeConstraints{ + $0.top.equalTo(textboxImageView2.snp.top).offset(20) + $0.left.equalTo(textboxImageView2.snp.left).offset(20) + $0.right.equalTo(textboxImageView2.snp.right).offset(-20) + $0.bottom.equalTo(textboxImageView2.snp.bottom).offset(-20) + } + + + self.nextBtnImageView3.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextLabel3.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView3).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + } + + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/JoinSuccessView.swift b/LGHTSG/LGHTSG/View/with RegisterView/JoinSuccessView.swift new file mode 100644 index 0000000..eec0fba --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/JoinSuccessView.swift @@ -0,0 +1,105 @@ +<<<<<<< Updated upstream +======= + +>>>>>>> Stashed changes +// +// JoinSuccessView.swift +// LGHTSG +// +// +<<<<<<< Updated upstream + +======= +>>>>>>> Stashed changes +import Foundation +import UIKit +import Alamofire +import SnapKit + +class JoinSuccessView : UIView { + + let iconVerticalImageView : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "icon_vertical") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + + let successLabel : UILabel = { + let label = UILabel() + label.text = "회원가입이 완료되었습니다." + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 16.0) + return label + }() + + let successContent : UILabel = { + let label = UILabel() + label.text = "라고할때살걸과 함께\n쉬운 금융 습관을 시작하세요!" + label.textColor = .white + label.numberOfLines = 0 + label.font = UIFont(name: "NanumSquareR", size: 14.0) + label.textAlignment = .center + return label + }() + + let successBtnImageView : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "success-btn") + return image + }() + + let successBtn : UIButton = { + let label = UIButton() + label.setTitle("라고할때살걸 시작하기", for: .normal) + label.titleLabel?.font = UIFont(name: "NanumSquareB", size: 16.0) + label.titleLabel?.textColor = .white + label.titleLabel?.textAlignment = .center + return label + }() + + override init(frame: CGRect) { + + super.init(frame: frame) + + addSubview(iconVerticalImageView) + addSubview(successLabel) + addSubview(successContent) + addSubview(successBtnImageView) + addSubview(successBtn) + + self.iconVerticalImageView.snp.makeConstraints { + $0.top.equalToSuperview().offset(250) + $0.centerX.equalToSuperview() + } + + self.successLabel.snp.makeConstraints{ + $0.top.equalTo(iconVerticalImageView.snp.bottom).offset(100) + $0.centerX.equalToSuperview() + } + + self.successContent.snp.makeConstraints{ + $0.top.equalTo(successLabel.snp.bottom).offset(20) + $0.centerX.equalToSuperview() + } + + + self.successBtnImageView.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-50) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.successBtn.snp.makeConstraints{ + $0.top.equalTo(successBtnImageView).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/LGHTSG/LGHTSG/View/with RegisterView/RegisterView.swift b/LGHTSG/LGHTSG/View/with RegisterView/RegisterView.swift new file mode 100644 index 0000000..d96872f --- /dev/null +++ b/LGHTSG/LGHTSG/View/with RegisterView/RegisterView.swift @@ -0,0 +1,554 @@ +// +// RegisterView.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/25. +// + +import Foundation +import UIKit +import Alamofire +import SnapKit + +class RegisterView : UIView { + + // MARK: 네비게이션 바 생성 + let navigationBar2 : UINavigationBar = { + let navigationBar = UINavigationBar() + navigationBar.translatesAutoresizingMaskIntoConstraints = false + return navigationBar + }() + + var profileImageData : String! + + // MARK: imagePicker + var profileImagePicker = UIImagePickerController() + + + // MARK: 사용자 이름 + let nameImageView: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + // hell@world.com, test1234! + + let nameTextField: UITextField = { + let name = UITextField() + name.leftViewMode = .always + name.attributedPlaceholder = NSAttributedString(string: "이름", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + name.borderStyle = .none + name.textColor = .white // 글자색을 흰색으로 + name.font = UIFont(name: "NanumSquareB", size: 15.0) + name.enablesReturnKeyAutomatically = true + name.translatesAutoresizingMaskIntoConstraints = false + return name + }() + + // MARK: 이메일 인증번호 보내기 + let emailSendImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "send-code-btn") + return image + }() + + let emailTextField3: UITextField = { + let label = UITextField() + label.attributedPlaceholder = NSAttributedString(string: "이메일", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + label.leftViewMode = .always + label.keyboardType = .emailAddress + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.borderStyle = .none + label.enablesReturnKeyAutomatically = true + return label + }() + + let emailCodeBtn2: UIButton = { + let btn = UIButton() + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 12.0) + btn.addTarget(self, action: #selector(emailCodeBtnClicked2), for: .touchUpInside) + //btn.backgroundColor = .red + btn.layer.cornerRadius = 5 + return btn + }() + + + // MARK: 인증번호 발송 메세지 + let codeSendLabel2: UILabel = { + let label = UILabel() + label.text = "인증번호가 발송되었습니다" + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 인증번호 확인하기 + let codeTextField2: UITextField = { + let label = UITextField() + label.attributedPlaceholder = NSAttributedString(string: "인증번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + label.leftViewMode = .always + label.textColor = .white + label.font = UIFont(name: "NanumSquareB", size: 15.0) + label.borderStyle = .none + label.enablesReturnKeyAutomatically = true + label.keyboardType = .numberPad + return label + }() + + let codeSendImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "confirm-code-btn") + return image + }() + + + let codeConfirmBtn2: UIButton = { + let btn = UIButton() + btn.titleLabel?.font = UIFont(name: "NanumSquareB", size: 12.0) + //btn.backgroundColor = .blue + btn.addTarget(self, action: #selector(codeConfirmBtnClicked2), for: .touchUpInside) + btn.layer.cornerRadius = 5 + return btn + }() + + + let codeConfirmLabel2: UILabel = { + let label = UILabel() + label.text = "인증번호가 일치하지 않습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + + // MARK: 비밀번호 + let pwImageView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let passwordTextField3: UITextField = { + let name = UITextField() + name.leftViewMode = .always + name.attributedPlaceholder = NSAttributedString(string: "비밀번호", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + name.borderStyle = .none + name.textColor = .white // 글자색을 흰색으로 + name.isSecureTextEntry = true + name.font = UIFont(name: "NanumSquareB", size: 15.0) + name.addTarget(self, action: #selector(pwFieldEdited2), for: UIControl.Event.editingChanged) + name.enablesReturnKeyAutomatically = true + name.translatesAutoresizingMaskIntoConstraints = false + return name + }() + + let pwValidLabel2: UILabel = { + let label = UILabel() + label.text = "영문, 숫자, 특수문자를 포함한 7자 이상으로 입력해주세요." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + // MARK: 비밀번호 찾기 + let pwImageCheckView2: UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + image.translatesAutoresizingMaskIntoConstraints = false + return image + }() + + let passworCheckdTextField3: UITextField = { + let name = UITextField() + name.leftViewMode = .always + name.attributedPlaceholder = NSAttributedString(string: "비밀번호 확인", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white]) + name.borderStyle = .none + name.textColor = .white // 글자색을 흰색으로 + name.isSecureTextEntry = true + name.font = UIFont(name: "NanumSquareB", size: 15.0) + name.addTarget(self, action: #selector(pwFieldEdited2), for: UIControl.Event.editingChanged) + name.enablesReturnKeyAutomatically = true + name.translatesAutoresizingMaskIntoConstraints = false + return name + }() + + let pwSameLabel2: UILabel = { + let label = UILabel() + label.text = "비밀번호가 일치하지 않습니다." + label.font = UIFont(name: "NanumSquareR", size: 12.0) + label.textColor = .systemRed + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + let nextBtnImageView : UIImageView = { + let image = UIImageView() + image.image = UIImage(named: "text-field") + return image + }() + + let nextBtn : UIButton = { + let label = UIButton() + label.setTitle("다음으로", for: .normal) + label.titleLabel?.font = UIFont(name: "NanumSquareB", size: 15.0) + label.titleLabel?.textColor = .white + label.titleLabel?.textAlignment = .center +<<<<<<< Updated upstream + label.addTarget(self, action: #selector(joinBtnClicked2), for: .touchUpInside) +======= + //label.addTarget(self, action: #selector(joinBtnClicked2), for: .touchUpInside) +>>>>>>> Stashed changes + return label + }() + + + + let emailCode2 = emailApiModel() + var code : String = "dklsfjkljdlvnmnxlmnszlksjwr091u3tghjkfnm,gdsajlkfjsclxnm,zbghjkjilekdsfkhglksefmdfbjfo;gsdlfknjbldkgs" + + // MARK: 인증번호 발송 함수 + @objc func emailCodeBtnClicked2(){ + print("인증번호 발송버튼") + guard let email = emailTextField3.text else {return} + + let bodyData : Parameters = [ + "email" : email, + ] + + emailCode2.requestEmailDataModel(bodyData: bodyData){ + data in + self.code = data.body + print(self.code) + } + sendCodeheight2.isActive = false + } + + + // MARK: 인증번호 확인 함수 + @objc func codeConfirmBtnClicked2(){ + if codeTextField2.text == self.code { + print("번호같음") + emailTextField3.isUserInteractionEnabled = false + codeTextField2.isUserInteractionEnabled = false + codeConfirmheight2.isActive = true + emailSuccess = "1" +<<<<<<< Updated upstream +======= + UserDefaults.standard.set(true, forKey: "ConfirmSuccess") +>>>>>>> Stashed changes + } + else { + codeConfirmheight2.isActive = false + } + } + + var validPw : String = "dlfksjd" + var samePw : String = "slkfjlkdjflk" + var emailSuccess : String = "dlskjflksjq3oi39hs" + + // MARK: 패스워드 맞는지 확인하는 함수 + func isSamePassword2(_ first: UITextField, _ second: UITextField) -> Bool { + if (first.text == second.text){ + samePw = "1" +<<<<<<< Updated upstream +======= + UserDefaults.standard.set(true, forKey: "samePw") +>>>>>>> Stashed changes + return true + } + return false + } + + // MARK: 패스워드 유효한지 확인 함수 + func isValidPassword2(pw: String?) -> Bool{ + + let regex = "^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[!@#$%^&*()_+=-]).{8,50}" + let predicate = NSPredicate(format: "SELF MATCHES %@", regex) + + if let hasPassword = pw{ + // 길이 확인 + if hasPassword.count > 7 && predicate.evaluate(with: hasPassword){ + print("패스워드 유효") + validPw = "1" +<<<<<<< Updated upstream +======= + UserDefaults.standard.set(true, forKey: "validPw") +>>>>>>> Stashed changes + return true + } + } + return false + } + + + var isCheck3 : Bool = false + var isCheck4 : Bool = false + + // MARK: 패스워드의 결과에 따라 메세지를 보여줄지 여부를 정하는 코드 + @objc func pwFieldEdited2(textField: UITextField) { + + if textField == passwordTextField3 { + if isValidPassword2(pw: passwordTextField3.text) + { + print("유효함") + pwheight3.isActive = true + isCheck3 = true + } + else{ + print("유효하지않음") + pwheight3.isActive = false + isCheck3 = false + + } + } + + else if textField == passworCheckdTextField3 { + if isSamePassword2(passwordTextField3, passworCheckdTextField3) + { + print("같음") + pwheight4.isActive = true + isCheck4 = true + } + else{ + print("다름") + pwheight4.isActive = false + isCheck4 = false + } + } + } + + // MARK: 인증번호 관련 동적 변화 라벨 + var sendCodeheight2: NSLayoutConstraint! + var codeConfirmheight2: NSLayoutConstraint! + + // MARK: 비밀번호에 따른 메세지 + var pwheight3: NSLayoutConstraint! + var pwheight4: NSLayoutConstraint! + + func heightSetting2(){ + + sendCodeheight2 = codeSendLabel2.heightAnchor.constraint(equalToConstant: 0) + sendCodeheight2.isActive = true + + codeConfirmheight2 = codeConfirmLabel2.heightAnchor.constraint(equalToConstant: 0) + codeConfirmheight2.isActive = true + + pwheight3 = pwValidLabel2.heightAnchor.constraint(equalToConstant: 0) + pwheight3.isActive = true + + pwheight4 = pwSameLabel2.heightAnchor.constraint(equalToConstant: 0) + pwheight4.isActive = true + + } + +<<<<<<< Updated upstream + +======= + /* +>>>>>>> Stashed changes + let joinAccess = JoinApiModel() + var userIndex : Int! + + @objc func joinBtnClicked2(){ + + if validPw == "1" && samePw == "1"{ + if emailSuccess == "1" { + print("회원가입 가능!") + guard let userName = nameTextField.text else {return} + guard let email = emailTextField3.text else {return} + guard let password = passwordTextField3.text else {return} + let emailCheck = "1" + let profileImg = "urlurl" + + let bodyData : Parameters = [ + "userName" : userName, + "email" : email, + "password" : password, + "emailCheck" : emailCheck, + "profileImg" : profileImg + ] + + joinAccess.requestJoinDataModel(bodyData: bodyData){ + data in + print(data.body) + } + UserDefaults.standard.set(true, forKey: "joinSuccess") + } + else { + print("인증번호 비완료") + } + } + else{ + print("비밀번호 과정을 통과하지못해 회원가입 불가능") + } + } +<<<<<<< Updated upstream +======= + */ +>>>>>>> Stashed changes + + + override init(frame: CGRect) { + + super.init(frame: frame) + + heightSetting2() + + addSubview(nameImageView) + addSubview(nameTextField) + + addSubview(emailSendImageView2) + addSubview(emailTextField3) + addSubview(emailCodeBtn2) + addSubview(codeSendLabel2) + + addSubview(codeSendImageView2) + addSubview(codeTextField2) + addSubview(codeConfirmBtn2) + addSubview(codeConfirmLabel2) + + + addSubview(pwImageView2) + addSubview(passwordTextField3) + addSubview(pwValidLabel2) + + addSubview(pwImageCheckView2) + addSubview(passworCheckdTextField3) + addSubview(pwSameLabel2) + + + addSubview(nextBtnImageView) + addSubview(nextBtn) + + + + // MARK: 이름 설정 위치 + self.nameImageView.snp.makeConstraints{ + $0.top.equalToSuperview().offset(40) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nameTextField.snp.makeConstraints{ + $0.top.equalToSuperview().offset(55) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-20) + } + + // MARK: 이메일 작성 및 전송 버튼 위치 + self.emailSendImageView2.snp.makeConstraints{ + $0.top.equalTo(nameImageView.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.emailTextField3.snp.makeConstraints{ + $0.top.equalTo(nameImageView.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-120) + } + + self.emailCodeBtn2.snp.makeConstraints{ + $0.top.equalTo(nameImageView.snp.bottom).offset(30) + $0.left.equalTo(emailTextField3.snp.right).offset(10) + $0.right.equalTo(emailSendImageView2.snp.right).offset(0) + $0.height.equalTo(emailSendImageView2).offset(0) + } + + + // MARK: 인증번호 작성 및 확인 버튼 위치 + self.codeSendImageView2.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.codeSendLabel2.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView2.snp.bottom).offset(5) + $0.left.equalTo(emailSendImageView2.snp.left) + } + + self.codeTextField2.snp.makeConstraints{ + $0.top.equalTo(emailSendImageView2.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-120) + } + + self.codeConfirmBtn2.snp.makeConstraints{ + $0.top.equalTo(codeSendImageView2.snp.top).offset(0) + $0.left.equalTo(codeTextField2.snp.right).offset(10) + $0.right.equalTo(codeSendImageView2.snp.right).offset(0) + $0.height.equalTo(codeSendImageView2.snp.height).offset(0) + } + + self.codeConfirmLabel2.snp.makeConstraints{ + $0.top.equalTo(codeSendImageView2.snp.bottom).offset(5) + $0.left.equalTo(codeSendImageView2.snp.left) + } + + + // MARK: 비밀번호 설정 위치 + self.pwImageView2.snp.makeConstraints{ + $0.top.equalTo(codeConfirmBtn2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.passwordTextField3.snp.makeConstraints{ + $0.top.equalTo(codeConfirmBtn2.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-20) + } + + self.pwValidLabel2.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(5) + $0.left.equalTo(pwImageView2.snp.left) + } + + self.pwImageCheckView2.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(30) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.passworCheckdTextField3.snp.makeConstraints{ + $0.top.equalTo(pwImageView2.snp.bottom).offset(45) + $0.left.equalToSuperview().offset(30) + $0.right.equalToSuperview().offset(-20) + } + + self.pwSameLabel2.snp.makeConstraints{ + $0.top.equalTo(pwImageCheckView2.snp.bottom).offset(5) + $0.left.equalTo(pwImageCheckView2.snp.left) + } + + // MARK: 다음으로 버튼 + self.nextBtnImageView.snp.makeConstraints{ + $0.bottom.equalToSuperview().offset(-10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + } + + self.nextBtn.snp.makeConstraints{ + $0.top.equalTo(nextBtnImageView).offset(10) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + + } + + + } + + required init?(coder: NSCoder){ + fatalError("init?(coder:) is not Supported") + } +} + diff --git a/LGHTSG/LGHTSG/ViewController.swift b/LGHTSG/LGHTSG/ViewController.swift index 87d3381..a70d89a 100644 --- a/LGHTSG/LGHTSG/ViewController.swift +++ b/LGHTSG/LGHTSG/ViewController.swift @@ -12,8 +12,43 @@ class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .darkGray + view.backgroundColor = .black + + + let StartView = StartView() + self.view.addSubview(StartView) + + + StartView.translatesAutoresizingMaskIntoConstraints = false + StartView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true + StartView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true + StartView.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true + StartView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true + + + StartView.loginBtn.addTarget(self, action: #selector(loginBtnClicked), for: .touchUpInside) + StartView.joinBtn.addTarget(self, action: #selector(joinBtnClicked), for: .touchUpInside) + StartView.findPwBtn.addTarget(self, action: #selector(findPwBtnClicked), for: .touchUpInside) } + + @objc func loginBtnClicked() { + let vc = LoginController() + vc.modalPresentationStyle = .overCurrentContext + self.present(vc, animated: true) + } + + @objc func joinBtnClicked() { + let vc = CheckAgreeController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + + @objc func findPwBtnClicked(){ + let vc = FindPassWordController() + vc.modalPresentationStyle = .fullScreen + self.present(vc, animated: true) + } + } diff --git a/LGHTSG/LGHTSG/ViewModel/ChangePwApiModel.swift b/LGHTSG/LGHTSG/ViewModel/ChangePwApiModel.swift new file mode 100644 index 0000000..598bef5 --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/ChangePwApiModel.swift @@ -0,0 +1,40 @@ +// +// ChangePwApiModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/31. +// + +import Foundation +import Alamofire + + +class ChangePwApiModel { + + var urlString : String? + + func requestChangeDataModel(bodyData : Parameters, onCompleted : @escaping(changePw) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/changeInfo/pw-not-login" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + + AF.request(url, method: .patch, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: changePw.self){ response in + switch response.result { + case .success(let response): + onCompleted(response) + case .failure(let error): + print(error.localizedDescription) + } + } + + } + +} diff --git a/LGHTSG/LGHTSG/ViewModel/ChangePwModel.swift b/LGHTSG/LGHTSG/ViewModel/ChangePwModel.swift new file mode 100644 index 0000000..598bef5 --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/ChangePwModel.swift @@ -0,0 +1,40 @@ +// +// ChangePwApiModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/31. +// + +import Foundation +import Alamofire + + +class ChangePwApiModel { + + var urlString : String? + + func requestChangeDataModel(bodyData : Parameters, onCompleted : @escaping(changePw) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/changeInfo/pw-not-login" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + + AF.request(url, method: .patch, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: changePw.self){ response in + switch response.result { + case .success(let response): + onCompleted(response) + case .failure(let error): + print(error.localizedDescription) + } + } + + } + +} diff --git a/LGHTSG/LGHTSG/ViewModel/JoinApiModel.swift b/LGHTSG/LGHTSG/ViewModel/JoinApiModel.swift new file mode 100644 index 0000000..e872fa1 --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/JoinApiModel.swift @@ -0,0 +1,44 @@ +// +// LoginData.swift +// LGHTSG + +import Foundation +import Alamofire + +class JoinApiModel { + + var urlString : String? + + func requestJoinDataModel(bodyData : Parameters, onCompleted : @escaping(join) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/sign-up" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + + AF.request(url, method: .post, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: join.self){ response in + switch response.result { +<<<<<<< Updated upstream + case .success(let response): + onCompleted(response) + case .failure(let error): +======= + case .success(let res): + print(response.debugDescription) + onCompleted(res) + case .failure(let error): + print(response.debugDescription) +>>>>>>> Stashed changes + print(error.localizedDescription) + } + } + + } + +} diff --git a/LGHTSG/LGHTSG/ViewModel/LoginApiHeaderModel.swift b/LGHTSG/LGHTSG/ViewModel/LoginApiHeaderModel.swift new file mode 100644 index 0000000..a54fbab --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/LoginApiHeaderModel.swift @@ -0,0 +1,83 @@ +// +// LoginApiHeaderModel.swift +// LGHTSG +// +// Created by 홍수정 on 2023/01/26. +// + +import Foundation +import Alamofire + +class LoginApiHeaderModel { + + var urlString : String? + + func requestLoginDataModel(bodyData : Parameters, onCompleted : @escaping(Login.header) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/log-in" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + +<<<<<<< Updated upstream + AF.request(url, method: .post, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: Login.self){ response in + switch response.result { + case .success(let response): + onCompleted(response.header) + case .failure(let error): + print("=======") + print(response) + print(error.localizedDescription) +======= + AF.request(url, method: .post, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: Login.header.self){ response in + + switch response.result { + + case .success(let res): + onCompleted(res) + + case .failure(_): + //print(response.debugDescription) + let result = response.debugDescription + var sstartIndex = 0 + var eendIndex = 0 + + for i in stride(from: result.count-18 , to: 0, by: -1){ + + let first = result[result.index(result.startIndex, offsetBy: i)] + let eight = result[result.index(result.startIndex, offsetBy: i+17)] + if first == "B" && eight == "h" { + sstartIndex = i+17 + break + } + } + for j in sstartIndex...result.count-58 { + let first = result[result.index(result.startIndex, offsetBy: j)] + let second = result[result.index(result.startIndex, offsetBy: j+56)] + let third = result[result.index(result.startIndex, offsetBy: j+57)] + if first == "h" && second == "}" && third == "}" { + eendIndex = j+57 + break + } + } + var resultt : String = "" + for i in stride(from: eendIndex, to: sstartIndex, by: -1) { + let first : String = String(result[result.index(result.startIndex, offsetBy: i)]) + resultt = resultt + first + } + //print(resultt) + UserDefaults.standard.set(resultt, forKey: "loginHeader") + print("등록되었음") +>>>>>>> Stashed changes + } + } + + } + +} diff --git a/LGHTSG/LGHTSG/ViewModel/LoginApiModel.swift b/LGHTSG/LGHTSG/ViewModel/LoginApiModel.swift new file mode 100644 index 0000000..0f6a626 --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/LoginApiModel.swift @@ -0,0 +1,46 @@ +// +// LoginData.swift +// LGHTSG + +import Foundation +import Alamofire + +class LoginApiModel { + + var urlString : String? + + func requestLoginDataModel(bodyData : Parameters, onCompleted : @escaping(Login.body) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/log-in" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + AF.request(url, method: .post, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: Login.self){ response in + switch response.result { + case .success(let response): +<<<<<<< Updated upstream + onCompleted(response.body) + case .failure(let error): + print(error.localizedDescription) +======= + UserDefaults.standard.set(true, forKey: "loginSuccess") + onCompleted(response.body) + case .failure(let error): + print("error") + UserDefaults.standard.set(false, forKey: "loginSuccess") + +>>>>>>> Stashed changes + } + } + + + + } + +} diff --git a/LGHTSG/LGHTSG/ViewModel/emailApiModel.swift b/LGHTSG/LGHTSG/ViewModel/emailApiModel.swift new file mode 100644 index 0000000..0456e56 --- /dev/null +++ b/LGHTSG/LGHTSG/ViewModel/emailApiModel.swift @@ -0,0 +1,36 @@ +// +// LoginData.swift +// LGHTSG + +import Foundation +import Alamofire + +class emailApiModel { + + var urlString : String? + + func requestEmailDataModel(bodyData : Parameters, onCompleted : @escaping(email) -> Void){ + + urlString = "http://api.lghtsg.site:8090/users/sign-up/email-check" + + guard let urlString = urlString else{ return} + guard let url = URL(string: urlString) else {return print("erorr")} + + + let header : HTTPHeaders = [ + "Content-Type" : "application/json" + ] + + + AF.request(url, method: .post, parameters: bodyData, encoding: JSONEncoding(), headers: header).validate().responseDecodable(of: email.self){ response in + switch response.result { + case .success(let response): + onCompleted(response) + case .failure(let error): + print(error.localizedDescription) + } + } + + } + +}