diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bdcbfd4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,157 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/macos,swift,xcode,cocoapods +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,swift,xcode,cocoapods + +### CocoaPods ### +## CocoaPods GitIgnore Template + +# CocoaPods - Only use to conserve bandwidth / Save time on Pushing +# - Also handy if you have a large number of dependant pods +# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE +Pods/ + +### Env +*.xcconfig +.env + + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# *.xcodeproj +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +*.resolved +.build/ + +# CocoaPods +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# Pods/ +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# Accio dependency management +Dependencies/ +.accio/ + +# fastlane +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Ignore all .plist files +*.plist + + +# Code Injection +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### Xcode ### + +## Xcode 8 and earlier + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcodeproj/project.xcworkspace/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.toptal.com/developers/gitignore/api/macos,swift,xcode,cocoapods + +# Ignore configuration file with sensitive data +Config.xcconfig + + diff --git a/Sopt_Appstore.xcodeproj/project.pbxproj b/Sopt_Appstore.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6ff1db2 --- /dev/null +++ b/Sopt_Appstore.xcodeproj/project.pbxproj @@ -0,0 +1,1035 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + D60A8A2E2CFEFE5600E48F24 /* FinanceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A2D2CFEFE5600E48F24 /* FinanceView.swift */; }; + D60A8A302CFF007F00E48F24 /* AppSectionBoxView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A2F2CFF007F00E48F24 /* AppSectionBoxView.swift */; }; + D60A8A322CFF01FB00E48F24 /* HeadScrollViewRowData.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A312CFF01FB00E48F24 /* HeadScrollViewRowData.swift */; }; + D60A8A342CFF021600E48F24 /* HeadTabviewViewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A332CFF021600E48F24 /* HeadTabviewViewViewModel.swift */; }; + D60A8A362CFF0DD000E48F24 /* HeadTabViewRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A352CFF0DD000E48F24 /* HeadTabViewRow.swift */; }; + D60A8A392CFF106000E48F24 /* HeadTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60A8A382CFF106000E48F24 /* HeadTabView.swift */; }; + D621CD782CDDFEEA00B3A420 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD772CDDFEEA00B3A420 /* Environment.swift */; }; + D621CD7A2CDDFF1100B3A420 /* ErrorEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD792CDDFF1100B3A420 /* ErrorEnum.swift */; }; + D621CD7E2CDE008400B3A420 /* DTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD7D2CDE008400B3A420 /* DTO.swift */; }; + D621CD812CDE077000B3A420 /* KeychainSwift in Frameworks */ = {isa = PBXBuildFile; productRef = D621CD802CDE077000B3A420 /* KeychainSwift */; }; + D621CD832CDE07A400B3A420 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD822CDE07A400B3A420 /* LoginViewController.swift */; }; + D621CD932CDE0F7A00B3A420 /* UserService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD922CDE0F7A00B3A420 /* UserService.swift */; }; + D621CD992CDE292200B3A420 /* RegisterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD982CDE292200B3A420 /* RegisterViewController.swift */; }; + D621CD9B2CDE2A9900B3A420 /* QueryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D621CD9A2CDE2A9900B3A420 /* QueryViewController.swift */; }; + D621CD9D2CDE3D7700B3A420 /* Configs.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */; }; + D63390F92CF756ED001164C8 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63390F82CF756ED001164C8 /* MainView.swift */; }; + D63390FD2CF75797001164C8 /* Applist.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63390FC2CF75797001164C8 /* Applist.swift */; }; + D636D2352CD247E900C8C1E2 /* HeadScrollViewRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2342CD247E900C8C1E2 /* HeadScrollViewRow.swift */; }; + D636D2382CD24E9900C8C1E2 /* ComponentExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2372CD24E9900C8C1E2 /* ComponentExtension.swift */; }; + D636D23C2CD260A300C8C1E2 /* ApptitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D23B2CD260A300C8C1E2 /* ApptitleView.swift */; }; + D636D23F2CD28F7700C8C1E2 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = D636D23E2CD28F7700C8C1E2 /* Then */; }; + D636D2422CD291A700C8C1E2 /* AppDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2412CD291A700C8C1E2 /* AppDataSet.swift */; }; + D636D2442CD291DF00C8C1E2 /* AppRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2432CD291DF00C8C1E2 /* AppRowView.swift */; }; + D636D2462CD2926800C8C1E2 /* ChartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2452CD2926800C8C1E2 /* ChartViewController.swift */; }; + D636D2492CD2ABCA00C8C1E2 /* AppHorizontalScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2482CD2ABCA00C8C1E2 /* AppHorizontalScrollView.swift */; }; + D636D24B2CD315FE00C8C1E2 /* CollectionViewRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D24A2CD315FE00C8C1E2 /* CollectionViewRow.swift */; }; + D636D24D2CD3265F00C8C1E2 /* HeadScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D24C2CD3265F00C8C1E2 /* HeadScrollView.swift */; }; + D636D2502CD32D8300C8C1E2 /* PreviewScroll View.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D24F2CD32D8300C8C1E2 /* PreviewScroll View.swift */; }; + D636D2532CD33A2E00C8C1E2 /* ReviewMidScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2522CD33A2E00C8C1E2 /* ReviewMidScrollView.swift */; }; + D636D2552CD33A4600C8C1E2 /* ReviewMidViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D636D2542CD33A4600C8C1E2 /* ReviewMidViewController.swift */; }; + D63E7C2A2CCB64D50092D225 /* ReviewTopViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C162CCB64D50092D225 /* ReviewTopViewController.swift */; }; + D63E7C2B2CCB64D50092D225 /* ReviewMidView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C172CCB64D50092D225 /* ReviewMidView.swift */; }; + D63E7C2C2CCB64D50092D225 /* HeaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C182CCB64D50092D225 /* HeaderViewController.swift */; }; + D63E7C2D2CCB64D50092D225 /* InfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C192CCB64D50092D225 /* InfoViewController.swift */; }; + D63E7C2E2CCB64D50092D225 /* PreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C1A2CCB64D50092D225 /* PreviewViewController.swift */; }; + D63E7C302CCB64D50092D225 /* ReviewBottomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C1C2CCB64D50092D225 /* ReviewBottomViewController.swift */; }; + D63E7C322CCB64D50092D225 /* UpdateInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C1E2CCB64D50092D225 /* UpdateInfoViewController.swift */; }; + D63E7C332CCB64D50092D225 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C202CCB64D50092D225 /* AppDelegate.swift */; }; + D63E7C342CCB64D50092D225 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C272CCB64D50092D225 /* SceneDelegate.swift */; }; + D63E7C352CCB64D50092D225 /* TossView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C282CCB64D50092D225 /* TossView.swift */; }; + D63E7C362CCB64D50092D225 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D63E7C212CCB64D50092D225 /* Assets.xcassets */; }; + D63E7C382CCB64D50092D225 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D63E7C242CCB64D50092D225 /* LaunchScreen.storyboard */; }; + D63E7C3D2CCBC7BD0092D225 /* VersionPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C3C2CCBC7BD0092D225 /* VersionPageViewController.swift */; }; + D63E7C402CCBCA8C0092D225 /* ReviewPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63E7C3F2CCBCA8C0092D225 /* ReviewPageViewController.swift */; }; + D64571712CF88D690016DDD8 /* Tap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64571702CF88D690016DDD8 /* Tap.swift */; }; + D645717F2CF8A0E30016DDD8 /* EntertainmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D645717E2CF8A0E30016DDD8 /* EntertainmentView.swift */; }; + D64BC8432CFF241200852010 /* AppRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64BC8422CFF241200852010 /* AppRow.swift */; }; + D64BC8462CFF271A00852010 /* SwiftUIAppViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64BC8452CFF271A00852010 /* SwiftUIAppViewModel.swift */; }; + D64BC8482CFF273300852010 /* SwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64BC8472CFF273300852010 /* SwiftUIApp.swift */; }; + D65BFECE2CD3FB1700797234 /* CharListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65BFECD2CD3FB1700797234 /* CharListView.swift */; }; + D669BF812CFF387F00F196DF /* GotoTossView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D669BF802CFF387F00F196DF /* GotoTossView.swift */; }; + D669BF832CFF3D0E00F196DF /* NavigationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D669BF822CFF3D0E00F196DF /* NavigationViewModel.swift */; }; + D6B32D8B2CD1DD74003EF497 /* FinanceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6B32D8A2CD1DD74003EF497 /* FinanceViewController.swift */; }; + D6B825C52CF82D34006834CB /* DefalutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6B825C42CF82D33006834CB /* DefalutView.swift */; }; + D6BD34742CDC45E300D4E69C /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = D6BD34732CDC45E300D4E69C /* Alamofire */; }; + D6D951162CF8171D00E34141 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D951152CF8171D00E34141 /* RootViewController.swift */; }; + D6F6185F2CC959DB001EE4EA /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = D6F6185E2CC959DB001EE4EA /* SnapKit */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D620236E2CC956FD002554FC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D620234F2CC956FC002554FC /* Project object */; + proxyType = 1; + remoteGlobalIDString = D62023562CC956FC002554FC; + remoteInfo = Sopt_Appstore; + }; + D62023782CC956FD002554FC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D620234F2CC956FC002554FC /* Project object */; + proxyType = 1; + remoteGlobalIDString = D62023562CC956FC002554FC; + remoteInfo = Sopt_Appstore; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D60A8A2D2CFEFE5600E48F24 /* FinanceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinanceView.swift; sourceTree = ""; }; + D60A8A2F2CFF007F00E48F24 /* AppSectionBoxView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSectionBoxView.swift; sourceTree = ""; }; + D60A8A312CFF01FB00E48F24 /* HeadScrollViewRowData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadScrollViewRowData.swift; sourceTree = ""; }; + D60A8A332CFF021600E48F24 /* HeadTabviewViewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadTabviewViewViewModel.swift; sourceTree = ""; }; + D60A8A352CFF0DD000E48F24 /* HeadTabViewRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadTabViewRow.swift; sourceTree = ""; }; + D60A8A382CFF106000E48F24 /* HeadTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadTabView.swift; sourceTree = ""; }; + D62023572CC956FC002554FC /* Sopt_Appstore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sopt_Appstore.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D620236D2CC956FD002554FC /* Sopt_AppstoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Sopt_AppstoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D62023772CC956FD002554FC /* Sopt_AppstoreUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Sopt_AppstoreUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D621CD772CDDFEEA00B3A420 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = ""; }; + D621CD792CDDFF1100B3A420 /* ErrorEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorEnum.swift; sourceTree = ""; }; + D621CD7D2CDE008400B3A420 /* DTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DTO.swift; sourceTree = ""; }; + D621CD822CDE07A400B3A420 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + D621CD922CDE0F7A00B3A420 /* UserService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserService.swift; sourceTree = ""; }; + D621CD982CDE292200B3A420 /* RegisterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterViewController.swift; sourceTree = ""; }; + D621CD9A2CDE2A9900B3A420 /* QueryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueryViewController.swift; sourceTree = ""; }; + D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Configs.xcconfig; sourceTree = ""; }; + D63390F82CF756ED001164C8 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; + D63390FC2CF75797001164C8 /* Applist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Applist.swift; sourceTree = ""; }; + D636D2342CD247E900C8C1E2 /* HeadScrollViewRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadScrollViewRow.swift; sourceTree = ""; }; + D636D2372CD24E9900C8C1E2 /* ComponentExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentExtension.swift; sourceTree = ""; }; + D636D23B2CD260A300C8C1E2 /* ApptitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApptitleView.swift; sourceTree = ""; }; + D636D2412CD291A700C8C1E2 /* AppDataSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDataSet.swift; sourceTree = ""; }; + D636D2432CD291DF00C8C1E2 /* AppRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppRowView.swift; sourceTree = ""; }; + D636D2452CD2926800C8C1E2 /* ChartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartViewController.swift; sourceTree = ""; }; + D636D2482CD2ABCA00C8C1E2 /* AppHorizontalScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppHorizontalScrollView.swift; sourceTree = ""; }; + D636D24A2CD315FE00C8C1E2 /* CollectionViewRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewRow.swift; sourceTree = ""; }; + D636D24C2CD3265F00C8C1E2 /* HeadScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadScrollView.swift; sourceTree = ""; }; + D636D24F2CD32D8300C8C1E2 /* PreviewScroll View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PreviewScroll View.swift"; sourceTree = ""; }; + D636D2522CD33A2E00C8C1E2 /* ReviewMidScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewMidScrollView.swift; sourceTree = ""; }; + D636D2542CD33A4600C8C1E2 /* ReviewMidViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewMidViewController.swift; sourceTree = ""; }; + D63E7C162CCB64D50092D225 /* ReviewTopViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewTopViewController.swift; sourceTree = ""; }; + D63E7C172CCB64D50092D225 /* ReviewMidView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewMidView.swift; sourceTree = ""; }; + D63E7C182CCB64D50092D225 /* HeaderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderViewController.swift; sourceTree = ""; }; + D63E7C192CCB64D50092D225 /* InfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoViewController.swift; sourceTree = ""; }; + D63E7C1A2CCB64D50092D225 /* PreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewViewController.swift; sourceTree = ""; }; + D63E7C1C2CCB64D50092D225 /* ReviewBottomViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewBottomViewController.swift; sourceTree = ""; }; + D63E7C1E2CCB64D50092D225 /* UpdateInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateInfoViewController.swift; sourceTree = ""; }; + D63E7C202CCB64D50092D225 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + D63E7C212CCB64D50092D225 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + D63E7C222CCB64D50092D225 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D63E7C232CCB64D50092D225 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + D63E7C272CCB64D50092D225 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + D63E7C282CCB64D50092D225 /* TossView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TossView.swift; sourceTree = ""; }; + D63E7C3C2CCBC7BD0092D225 /* VersionPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionPageViewController.swift; sourceTree = ""; }; + D63E7C3F2CCBCA8C0092D225 /* ReviewPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewPageViewController.swift; sourceTree = ""; }; + D64571702CF88D690016DDD8 /* Tap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tap.swift; sourceTree = ""; }; + D645717E2CF8A0E30016DDD8 /* EntertainmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntertainmentView.swift; sourceTree = ""; }; + D64BC8422CFF241200852010 /* AppRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppRow.swift; sourceTree = ""; }; + D64BC8452CFF271A00852010 /* SwiftUIAppViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIAppViewModel.swift; sourceTree = ""; }; + D64BC8472CFF273300852010 /* SwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIApp.swift; sourceTree = ""; }; + D65BFECD2CD3FB1700797234 /* CharListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharListView.swift; sourceTree = ""; }; + D669BF802CFF387F00F196DF /* GotoTossView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GotoTossView.swift; sourceTree = ""; }; + D669BF822CFF3D0E00F196DF /* NavigationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationViewModel.swift; sourceTree = ""; }; + D6B32D8A2CD1DD74003EF497 /* FinanceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinanceViewController.swift; sourceTree = ""; }; + D6B825C42CF82D33006834CB /* DefalutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefalutView.swift; sourceTree = ""; }; + D6D951152CF8171D00E34141 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + D62023702CC956FD002554FC /* Sopt_AppstoreTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Sopt_AppstoreTests; + sourceTree = ""; + }; + D620237A2CC956FD002554FC /* Sopt_AppstoreUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Sopt_AppstoreUITests; + sourceTree = ""; + }; + D65BFEC42CD3B30000797234 /* RatingViewController */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = RatingViewController; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + D62023542CC956FC002554FC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D6BD34742CDC45E300D4E69C /* Alamofire in Frameworks */, + D6F6185F2CC959DB001EE4EA /* SnapKit in Frameworks */, + D621CD812CDE077000B3A420 /* KeychainSwift in Frameworks */, + D636D23F2CD28F7700C8C1E2 /* Then in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D620236A2CC956FD002554FC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D62023742CC956FD002554FC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D60A8A2A2CFEFDD300E48F24 /* View */ = { + isa = PBXGroup; + children = ( + D64BC83E2CFF17C000852010 /* AppBoxView */, + D63390F82CF756ED001164C8 /* MainView.swift */, + D64BC8412CFF23F800852010 /* AppChart */, + D64BC8442CFF241D00852010 /* NavigtionView */, + D60A8A372CFF102C00E48F24 /* HeadView */, + D60A8A2D2CFEFE5600E48F24 /* FinanceView.swift */, + D669BF802CFF387F00F196DF /* GotoTossView.swift */, + ); + path = View; + sourceTree = ""; + }; + D60A8A2B2CFEFDDF00E48F24 /* Model */ = { + isa = PBXGroup; + children = ( + D64571702CF88D690016DDD8 /* Tap.swift */, + D60A8A312CFF01FB00E48F24 /* HeadScrollViewRowData.swift */, + D64BC8472CFF273300852010 /* SwiftUIApp.swift */, + ); + path = Model; + sourceTree = ""; + }; + D60A8A2C2CFEFDE500E48F24 /* ViewModel */ = { + isa = PBXGroup; + children = ( + D60A8A332CFF021600E48F24 /* HeadTabviewViewViewModel.swift */, + D64BC8452CFF271A00852010 /* SwiftUIAppViewModel.swift */, + D669BF822CFF3D0E00F196DF /* NavigationViewModel.swift */, + ); + path = ViewModel; + sourceTree = ""; + }; + D60A8A372CFF102C00E48F24 /* HeadView */ = { + isa = PBXGroup; + children = ( + D60A8A352CFF0DD000E48F24 /* HeadTabViewRow.swift */, + D60A8A382CFF106000E48F24 /* HeadTabView.swift */, + ); + path = HeadView; + sourceTree = ""; + }; + D620234E2CC956FC002554FC = { + isa = PBXGroup; + children = ( + D63E7C292CCB64D50092D225 /* Sopt_Appstore */, + D62023702CC956FD002554FC /* Sopt_AppstoreTests */, + D620237A2CC956FD002554FC /* Sopt_AppstoreUITests */, + D62023582CC956FC002554FC /* Products */, + ); + sourceTree = ""; + }; + D62023582CC956FC002554FC /* Products */ = { + isa = PBXGroup; + children = ( + D62023572CC956FC002554FC /* Sopt_Appstore.app */, + D620236D2CC956FD002554FC /* Sopt_AppstoreTests.xctest */, + D62023772CC956FD002554FC /* Sopt_AppstoreUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D621CD7B2CDE002D00B3A420 /* VIew */ = { + isa = PBXGroup; + children = ( + D636D2362CD24E8600C8C1E2 /* Extension */, + D63E7C1F2CCB64D50092D225 /* AppStoreViewModules */, + D6B32D892CD1DD3D003EF497 /* FinanceView */, + D63E7C3E2CCBC7CD0092D225 /* Navigation */, + ); + path = VIew; + sourceTree = ""; + }; + D621CD7C2CDE004400B3A420 /* Server */ = { + isa = PBXGroup; + children = ( + D621CD7D2CDE008400B3A420 /* DTO.swift */, + D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */, + D621CD772CDDFEEA00B3A420 /* Environment.swift */, + D621CD792CDDFF1100B3A420 /* ErrorEnum.swift */, + D621CD822CDE07A400B3A420 /* LoginViewController.swift */, + D621CD9A2CDE2A9900B3A420 /* QueryViewController.swift */, + D621CD982CDE292200B3A420 /* RegisterViewController.swift */, + D621CD922CDE0F7A00B3A420 /* UserService.swift */, + ); + path = Server; + sourceTree = ""; + }; + D63390F72CF756D1001164C8 /* SwiftUI */ = { + isa = PBXGroup; + children = ( + D60A8A2C2CFEFDE500E48F24 /* ViewModel */, + D60A8A2B2CFEFDDF00E48F24 /* Model */, + D60A8A2A2CFEFDD300E48F24 /* View */, + ); + path = SwiftUI; + sourceTree = ""; + }; + D636D2362CD24E8600C8C1E2 /* Extension */ = { + isa = PBXGroup; + children = ( + D636D2372CD24E9900C8C1E2 /* ComponentExtension.swift */, + ); + path = Extension; + sourceTree = ""; + }; + D636D2402CD2903700C8C1E2 /* AppChartView */ = { + isa = PBXGroup; + children = ( + D636D2412CD291A700C8C1E2 /* AppDataSet.swift */, + D636D2432CD291DF00C8C1E2 /* AppRowView.swift */, + D636D2452CD2926800C8C1E2 /* ChartViewController.swift */, + D65BFECD2CD3FB1700797234 /* CharListView.swift */, + ); + path = AppChartView; + sourceTree = ""; + }; + D636D2472CD2ABA800C8C1E2 /* AppHorizontalScrollView */ = { + isa = PBXGroup; + children = ( + D636D2482CD2ABCA00C8C1E2 /* AppHorizontalScrollView.swift */, + D636D24A2CD315FE00C8C1E2 /* CollectionViewRow.swift */, + ); + path = AppHorizontalScrollView; + sourceTree = ""; + }; + D636D24E2CD32B6300C8C1E2 /* PreViewScrollView */ = { + isa = PBXGroup; + children = ( + D63E7C1A2CCB64D50092D225 /* PreviewViewController.swift */, + D636D24F2CD32D8300C8C1E2 /* PreviewScroll View.swift */, + ); + path = PreViewScrollView; + sourceTree = ""; + }; + D636D2512CD3366600C8C1E2 /* ReviewMidViewController */ = { + isa = PBXGroup; + children = ( + D63E7C172CCB64D50092D225 /* ReviewMidView.swift */, + D636D2522CD33A2E00C8C1E2 /* ReviewMidScrollView.swift */, + D636D2542CD33A4600C8C1E2 /* ReviewMidViewController.swift */, + ); + path = ReviewMidViewController; + sourceTree = ""; + }; + D63E7C1F2CCB64D50092D225 /* AppStoreViewModules */ = { + isa = PBXGroup; + children = ( + D63E7C282CCB64D50092D225 /* TossView.swift */, + D63E7C182CCB64D50092D225 /* HeaderViewController.swift */, + D65BFEC42CD3B30000797234 /* RatingViewController */, + D636D24E2CD32B6300C8C1E2 /* PreViewScrollView */, + D63E7C1E2CCB64D50092D225 /* UpdateInfoViewController.swift */, + D63E7C192CCB64D50092D225 /* InfoViewController.swift */, + D63E7C162CCB64D50092D225 /* ReviewTopViewController.swift */, + D636D2512CD3366600C8C1E2 /* ReviewMidViewController */, + D63E7C1C2CCB64D50092D225 /* ReviewBottomViewController.swift */, + ); + path = AppStoreViewModules; + sourceTree = ""; + }; + D63E7C292CCB64D50092D225 /* Sopt_Appstore */ = { + isa = PBXGroup; + children = ( + D63390F72CF756D1001164C8 /* SwiftUI */, + D63E7C222CCB64D50092D225 /* Info.plist */, + D621CD7C2CDE004400B3A420 /* Server */, + D621CD7B2CDE002D00B3A420 /* VIew */, + D6B32D882CD1DD20003EF497 /* Delegate */, + D6D951152CF8171D00E34141 /* RootViewController.swift */, + ); + path = Sopt_Appstore; + sourceTree = ""; + }; + D63E7C3E2CCBC7CD0092D225 /* Navigation */ = { + isa = PBXGroup; + children = ( + D63E7C3C2CCBC7BD0092D225 /* VersionPageViewController.swift */, + D63E7C3F2CCBCA8C0092D225 /* ReviewPageViewController.swift */, + ); + path = Navigation; + sourceTree = ""; + }; + D64BC83E2CFF17C000852010 /* AppBoxView */ = { + isa = PBXGroup; + children = ( + D60A8A2F2CFF007F00E48F24 /* AppSectionBoxView.swift */, + ); + path = AppBoxView; + sourceTree = ""; + }; + D64BC8412CFF23F800852010 /* AppChart */ = { + isa = PBXGroup; + children = ( + D63390FC2CF75797001164C8 /* Applist.swift */, + D64BC8422CFF241200852010 /* AppRow.swift */, + ); + path = AppChart; + sourceTree = ""; + }; + D64BC8442CFF241D00852010 /* NavigtionView */ = { + isa = PBXGroup; + children = ( + D645717E2CF8A0E30016DDD8 /* EntertainmentView.swift */, + D6B825C42CF82D33006834CB /* DefalutView.swift */, + ); + path = NavigtionView; + sourceTree = ""; + }; + D67AC1C72CD4952C00C1A948 /* HeadScrollViewRow */ = { + isa = PBXGroup; + children = ( + D636D2342CD247E900C8C1E2 /* HeadScrollViewRow.swift */, + D636D24C2CD3265F00C8C1E2 /* HeadScrollView.swift */, + ); + path = HeadScrollViewRow; + sourceTree = ""; + }; + D6B32D882CD1DD20003EF497 /* Delegate */ = { + isa = PBXGroup; + children = ( + D63E7C242CCB64D50092D225 /* LaunchScreen.storyboard */, + D63E7C202CCB64D50092D225 /* AppDelegate.swift */, + D63E7C272CCB64D50092D225 /* SceneDelegate.swift */, + D63E7C212CCB64D50092D225 /* Assets.xcassets */, + ); + path = Delegate; + sourceTree = ""; + }; + D6B32D892CD1DD3D003EF497 /* FinanceView */ = { + isa = PBXGroup; + children = ( + D6B32D8A2CD1DD74003EF497 /* FinanceViewController.swift */, + D67AC1C72CD4952C00C1A948 /* HeadScrollViewRow */, + D636D23B2CD260A300C8C1E2 /* ApptitleView.swift */, + D636D2472CD2ABA800C8C1E2 /* AppHorizontalScrollView */, + D636D2402CD2903700C8C1E2 /* AppChartView */, + ); + path = FinanceView; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D62023562CC956FC002554FC /* Sopt_Appstore */ = { + isa = PBXNativeTarget; + buildConfigurationList = D62023802CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_Appstore" */; + buildPhases = ( + D62023532CC956FC002554FC /* Sources */, + D62023542CC956FC002554FC /* Frameworks */, + D62023552CC956FC002554FC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + D65BFEC42CD3B30000797234 /* RatingViewController */, + ); + name = Sopt_Appstore; + packageProductDependencies = ( + D6F6185E2CC959DB001EE4EA /* SnapKit */, + D636D23E2CD28F7700C8C1E2 /* Then */, + D6BD34732CDC45E300D4E69C /* Alamofire */, + D621CD802CDE077000B3A420 /* KeychainSwift */, + ); + productName = Sopt_Appstore; + productReference = D62023572CC956FC002554FC /* Sopt_Appstore.app */; + productType = "com.apple.product-type.application"; + }; + D620236C2CC956FD002554FC /* Sopt_AppstoreTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D62023852CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_AppstoreTests" */; + buildPhases = ( + D62023692CC956FD002554FC /* Sources */, + D620236A2CC956FD002554FC /* Frameworks */, + D620236B2CC956FD002554FC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D620236F2CC956FD002554FC /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + D62023702CC956FD002554FC /* Sopt_AppstoreTests */, + ); + name = Sopt_AppstoreTests; + packageProductDependencies = ( + ); + productName = Sopt_AppstoreTests; + productReference = D620236D2CC956FD002554FC /* Sopt_AppstoreTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + D62023762CC956FD002554FC /* Sopt_AppstoreUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D62023882CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_AppstoreUITests" */; + buildPhases = ( + D62023732CC956FD002554FC /* Sources */, + D62023742CC956FD002554FC /* Frameworks */, + D62023752CC956FD002554FC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D62023792CC956FD002554FC /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + D620237A2CC956FD002554FC /* Sopt_AppstoreUITests */, + ); + name = Sopt_AppstoreUITests; + packageProductDependencies = ( + ); + productName = Sopt_AppstoreUITests; + productReference = D62023772CC956FD002554FC /* Sopt_AppstoreUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D620234F2CC956FC002554FC /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; + TargetAttributes = { + D62023562CC956FC002554FC = { + CreatedOnToolsVersion = 16.0; + }; + D620236C2CC956FD002554FC = { + CreatedOnToolsVersion = 16.0; + TestTargetID = D62023562CC956FC002554FC; + }; + D62023762CC956FD002554FC = { + CreatedOnToolsVersion = 16.0; + TestTargetID = D62023562CC956FC002554FC; + }; + }; + }; + buildConfigurationList = D62023522CC956FC002554FC /* Build configuration list for PBXProject "Sopt_Appstore" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D620234E2CC956FC002554FC; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + D6F6185D2CC959DB001EE4EA /* XCRemoteSwiftPackageReference "SnapKit" */, + D636D23D2CD28F7700C8C1E2 /* XCRemoteSwiftPackageReference "Then" */, + D6BD34722CDC45E300D4E69C /* XCRemoteSwiftPackageReference "Alamofire" */, + D621CD7F2CDE077000B3A420 /* XCRemoteSwiftPackageReference "keychain-swift" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = D62023582CC956FC002554FC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D62023562CC956FC002554FC /* Sopt_Appstore */, + D620236C2CC956FD002554FC /* Sopt_AppstoreTests */, + D62023762CC956FD002554FC /* Sopt_AppstoreUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D62023552CC956FC002554FC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D621CD9D2CDE3D7700B3A420 /* Configs.xcconfig in Resources */, + D63E7C362CCB64D50092D225 /* Assets.xcassets in Resources */, + D63E7C382CCB64D50092D225 /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D620236B2CC956FD002554FC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D62023752CC956FD002554FC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D62023532CC956FC002554FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D60A8A322CFF01FB00E48F24 /* HeadScrollViewRowData.swift in Sources */, + D60A8A2E2CFEFE5600E48F24 /* FinanceView.swift in Sources */, + D669BF812CFF387F00F196DF /* GotoTossView.swift in Sources */, + D63E7C2A2CCB64D50092D225 /* ReviewTopViewController.swift in Sources */, + D6B32D8B2CD1DD74003EF497 /* FinanceViewController.swift in Sources */, + D63E7C2B2CCB64D50092D225 /* ReviewMidView.swift in Sources */, + D621CD9B2CDE2A9900B3A420 /* QueryViewController.swift in Sources */, + D645717F2CF8A0E30016DDD8 /* EntertainmentView.swift in Sources */, + D636D24D2CD3265F00C8C1E2 /* HeadScrollView.swift in Sources */, + D636D2552CD33A4600C8C1E2 /* ReviewMidViewController.swift in Sources */, + D63E7C2C2CCB64D50092D225 /* HeaderViewController.swift in Sources */, + D621CD932CDE0F7A00B3A420 /* UserService.swift in Sources */, + D636D2442CD291DF00C8C1E2 /* AppRowView.swift in Sources */, + D636D2462CD2926800C8C1E2 /* ChartViewController.swift in Sources */, + D636D2502CD32D8300C8C1E2 /* PreviewScroll View.swift in Sources */, + D64BC8432CFF241200852010 /* AppRow.swift in Sources */, + D63E7C2D2CCB64D50092D225 /* InfoViewController.swift in Sources */, + D636D2352CD247E900C8C1E2 /* HeadScrollViewRow.swift in Sources */, + D60A8A362CFF0DD000E48F24 /* HeadTabViewRow.swift in Sources */, + D63E7C2E2CCB64D50092D225 /* PreviewViewController.swift in Sources */, + D63E7C402CCBCA8C0092D225 /* ReviewPageViewController.swift in Sources */, + D636D2422CD291A700C8C1E2 /* AppDataSet.swift in Sources */, + D636D2532CD33A2E00C8C1E2 /* ReviewMidScrollView.swift in Sources */, + D621CD992CDE292200B3A420 /* RegisterViewController.swift in Sources */, + D6B825C52CF82D34006834CB /* DefalutView.swift in Sources */, + D63E7C302CCB64D50092D225 /* ReviewBottomViewController.swift in Sources */, + D669BF832CFF3D0E00F196DF /* NavigationViewModel.swift in Sources */, + D621CD782CDDFEEA00B3A420 /* Environment.swift in Sources */, + D64571712CF88D690016DDD8 /* Tap.swift in Sources */, + D60A8A302CFF007F00E48F24 /* AppSectionBoxView.swift in Sources */, + D60A8A392CFF106000E48F24 /* HeadTabView.swift in Sources */, + D6D951162CF8171D00E34141 /* RootViewController.swift in Sources */, + D64BC8482CFF273300852010 /* SwiftUIApp.swift in Sources */, + D636D24B2CD315FE00C8C1E2 /* CollectionViewRow.swift in Sources */, + D63E7C322CCB64D50092D225 /* UpdateInfoViewController.swift in Sources */, + D63E7C3D2CCBC7BD0092D225 /* VersionPageViewController.swift in Sources */, + D65BFECE2CD3FB1700797234 /* CharListView.swift in Sources */, + D63390F92CF756ED001164C8 /* MainView.swift in Sources */, + D636D2492CD2ABCA00C8C1E2 /* AppHorizontalScrollView.swift in Sources */, + D63E7C332CCB64D50092D225 /* AppDelegate.swift in Sources */, + D64BC8462CFF271A00852010 /* SwiftUIAppViewModel.swift in Sources */, + D60A8A342CFF021600E48F24 /* HeadTabviewViewViewModel.swift in Sources */, + D636D2382CD24E9900C8C1E2 /* ComponentExtension.swift in Sources */, + D636D23C2CD260A300C8C1E2 /* ApptitleView.swift in Sources */, + D63E7C342CCB64D50092D225 /* SceneDelegate.swift in Sources */, + D63390FD2CF75797001164C8 /* Applist.swift in Sources */, + D621CD832CDE07A400B3A420 /* LoginViewController.swift in Sources */, + D621CD7A2CDDFF1100B3A420 /* ErrorEnum.swift in Sources */, + D621CD7E2CDE008400B3A420 /* DTO.swift in Sources */, + D63E7C352CCB64D50092D225 /* TossView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D62023692CC956FD002554FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D62023732CC956FD002554FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D620236F2CC956FD002554FC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D62023562CC956FC002554FC /* Sopt_Appstore */; + targetProxy = D620236E2CC956FD002554FC /* PBXContainerItemProxy */; + }; + D62023792CC956FD002554FC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D62023562CC956FC002554FC /* Sopt_Appstore */; + targetProxy = D62023782CC956FD002554FC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D63E7C242CCB64D50092D225 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D63E7C232CCB64D50092D225 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D62023812CC956FD002554FC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Sopt_Appstore/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-Appstore"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D62023822CC956FD002554FC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Sopt_Appstore/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-Appstore"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + D62023832CC956FD002554FC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + D62023842CC956FD002554FC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D621CD9C2CDE3D7700B3A420 /* Configs.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + D62023862CC956FD002554FC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-AppstoreTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sopt_Appstore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Sopt_Appstore"; + }; + name = Debug; + }; + D62023872CC956FD002554FC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-AppstoreTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sopt_Appstore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Sopt_Appstore"; + }; + name = Release; + }; + D62023892CC956FD002554FC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-AppstoreUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Sopt_Appstore; + }; + name = Debug; + }; + D620238A2CC956FD002554FC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5UQJWXQTJD; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "sopt.Sopt-AppstoreUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Sopt_Appstore; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D62023522CC956FC002554FC /* Build configuration list for PBXProject "Sopt_Appstore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D62023832CC956FD002554FC /* Debug */, + D62023842CC956FD002554FC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D62023802CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_Appstore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D62023812CC956FD002554FC /* Debug */, + D62023822CC956FD002554FC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D62023852CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_AppstoreTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D62023862CC956FD002554FC /* Debug */, + D62023872CC956FD002554FC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D62023882CC956FD002554FC /* Build configuration list for PBXNativeTarget "Sopt_AppstoreUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D62023892CC956FD002554FC /* Debug */, + D620238A2CC956FD002554FC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + D621CD7F2CDE077000B3A420 /* XCRemoteSwiftPackageReference "keychain-swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/evgenyneu/keychain-swift"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 24.0.0; + }; + }; + D636D23D2CD28F7700C8C1E2 /* XCRemoteSwiftPackageReference "Then" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/devxoul/Then"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.0.0; + }; + }; + D6BD34722CDC45E300D4E69C /* XCRemoteSwiftPackageReference "Alamofire" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Alamofire/Alamofire.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.10.1; + }; + }; + D6F6185D2CC959DB001EE4EA /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.7.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + D621CD802CDE077000B3A420 /* KeychainSwift */ = { + isa = XCSwiftPackageProductDependency; + package = D621CD7F2CDE077000B3A420 /* XCRemoteSwiftPackageReference "keychain-swift" */; + productName = KeychainSwift; + }; + D636D23E2CD28F7700C8C1E2 /* Then */ = { + isa = XCSwiftPackageProductDependency; + package = D636D23D2CD28F7700C8C1E2 /* XCRemoteSwiftPackageReference "Then" */; + productName = Then; + }; + D6BD34732CDC45E300D4E69C /* Alamofire */ = { + isa = XCSwiftPackageProductDependency; + package = D6BD34722CDC45E300D4E69C /* XCRemoteSwiftPackageReference "Alamofire" */; + productName = Alamofire; + }; + D6F6185E2CC959DB001EE4EA /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = D6F6185D2CC959DB001EE4EA /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = D620234F2CC956FC002554FC /* Project object */; +} diff --git a/Sopt_Appstore.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sopt_Appstore.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Sopt_Appstore.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sopt_Appstore/Delegate/AppDelegate.swift b/Sopt_Appstore/Delegate/AppDelegate.swift new file mode 100644 index 0000000..7000b46 --- /dev/null +++ b/Sopt_Appstore/Delegate/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + +import UIKit + +@main + +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/1.png b/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/1.png new file mode 100644 index 0000000..f9285aa Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/1.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/Contents.json new file mode 100644 index 0000000..38ee28b --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/10.png b/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/10.png new file mode 100644 index 0000000..bdb0f84 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/10.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/Contents.json new file mode 100644 index 0000000..1d3ed0c --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/10.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "10.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/11.png b/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/11.png new file mode 100644 index 0000000..55ffb67 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/11.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/Contents.json new file mode 100644 index 0000000..f042f79 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/11.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "11.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/12.png b/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/12.png new file mode 100644 index 0000000..394ede3 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/12.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/Contents.json new file mode 100644 index 0000000..0f3043a --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/12.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "12.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/13.png b/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/13.png new file mode 100644 index 0000000..11f6264 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/13.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/Contents.json new file mode 100644 index 0000000..76649d9 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/13.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "13.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/14.png b/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/14.png new file mode 100644 index 0000000..a820161 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/14.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/Contents.json new file mode 100644 index 0000000..4babae3 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/14.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "14.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/15.png b/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/15.png new file mode 100644 index 0000000..4fe6bb2 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/15.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/Contents.json new file mode 100644 index 0000000..0ac0fa8 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/15.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "15.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/16.png b/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/16.png new file mode 100644 index 0000000..0d52f3a Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/16.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/Contents.json new file mode 100644 index 0000000..8edf82d --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/16.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "16.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/17.png b/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/17.png new file mode 100644 index 0000000..ec4f1b0 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/17.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/Contents.json new file mode 100644 index 0000000..bcdfca2 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/17.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "17.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/18.png b/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/18.png new file mode 100644 index 0000000..f72da49 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/18.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/Contents.json new file mode 100644 index 0000000..b1909fc --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/18.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "18.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/2.png b/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/2.png new file mode 100644 index 0000000..4ae02b1 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/2.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/Contents.json new file mode 100644 index 0000000..c6348dd --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/3.png b/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/3.png new file mode 100644 index 0000000..694ae55 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/3.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/Contents.json new file mode 100644 index 0000000..53eb8f1 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/4.png b/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/4.png new file mode 100644 index 0000000..2eaf555 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/4.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/Contents.json new file mode 100644 index 0000000..6ebd06d --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "4.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/5.png b/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/5.png new file mode 100644 index 0000000..519a40f Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/5.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/Contents.json new file mode 100644 index 0000000..90ec8dd --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "5.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/6.png b/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/6.png new file mode 100644 index 0000000..2ebf003 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/6.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/Contents.json new file mode 100644 index 0000000..a8c87a0 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/6.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "6.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/7.png b/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/7.png new file mode 100644 index 0000000..4ba3a17 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/7.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/Contents.json new file mode 100644 index 0000000..fcced6a --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/7.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "7.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/8.png b/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/8.png new file mode 100644 index 0000000..bb86acd Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/8.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/Contents.json new file mode 100644 index 0000000..6ec0a4d --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/8.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "8.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/9.png b/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/9.png new file mode 100644 index 0000000..8ea0925 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/9.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/Contents.json new file mode 100644 index 0000000..7d8ece9 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/9.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "9.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/AccentColor.colorset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Contents.json new file mode 100644 index 0000000..05a7df6 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Toss_App_Icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Toss_App_Icon.png b/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Toss_App_Icon.png new file mode 100644 index 0000000..7d6bce7 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/Toss_App_Icon.imageset/Toss_App_Icon.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/Contents.json new file mode 100644 index 0000000..93d0daf --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pngtree-vibrato-color-matching-abstract-creative-background-image_358767.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/pngtree-vibrato-color-matching-abstract-creative-background-image_358767.jpg b/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/pngtree-vibrato-color-matching-abstract-creative-background-image_358767.jpg new file mode 100644 index 0000000..d63b829 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/background.imageset/pngtree-vibrato-color-matching-abstract-creative-background-image_358767.jpg differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Contents.json new file mode 100644 index 0000000..17f6fd9 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Image.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Image.png b/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Image.png new file mode 100644 index 0000000..27e5195 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/tictokIcon.imageset/Image.png differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/Contents.json new file mode 100644 index 0000000..6a64651 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_6871.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/IMG_6871.jpg b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/IMG_6871.jpg new file mode 100644 index 0000000..6dbfa68 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview1.imageset/IMG_6871.jpg differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/Contents.json new file mode 100644 index 0000000..fd95bca --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_6872.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/IMG_6872.jpg b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/IMG_6872.jpg new file mode 100644 index 0000000..c6284b8 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview2.imageset/IMG_6872.jpg differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/Contents.json new file mode 100644 index 0000000..ab95029 --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_6873.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/IMG_6873.jpg b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/IMG_6873.jpg new file mode 100644 index 0000000..b8434a1 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview3.imageset/IMG_6873.jpg differ diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/Contents.json b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/Contents.json new file mode 100644 index 0000000..d8df4bc --- /dev/null +++ b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_6874.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/IMG_6874.jpg b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/IMG_6874.jpg new file mode 100644 index 0000000..8b96b16 Binary files /dev/null and b/Sopt_Appstore/Delegate/Assets.xcassets/tossPreview4.imageset/IMG_6874.jpg differ diff --git a/Sopt_Appstore/Delegate/Base.lproj/LaunchScreen.storyboard b/Sopt_Appstore/Delegate/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Sopt_Appstore/Delegate/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sopt_Appstore/Delegate/SceneDelegate.swift b/Sopt_Appstore/Delegate/SceneDelegate.swift new file mode 100644 index 0000000..42b4924 --- /dev/null +++ b/Sopt_Appstore/Delegate/SceneDelegate.swift @@ -0,0 +1,49 @@ +// +// SceneDelegate.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene( + _ scene: UIScene, + willConnectTo session: UISceneSession, + options connectionOptions: UIScene.ConnectionOptions + ) { + guard let windowScene = (scene as? UIWindowScene) else { return } + self.window = UIWindow(windowScene: windowScene) + let navigationController = UINavigationController(rootViewController: RootViewController()) + self.window?.rootViewController = navigationController + self.window?.makeKeyAndVisible() + } + + + + func sceneDidDisconnect(_ scene: UIScene) { + // ์”ฌ์ด ์—ฐ๊ฒฐ ํ•ด์ œ๋  ๋•Œ + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // ์”ฌ์ด ํ™œ์„ฑ ์ƒํƒœ๊ฐ€ ๋  ๋•Œ + } + + func sceneWillResignActive(_ scene: UIScene) { + // ์”ฌ์ด ๋น„ํ™œ์„ฑ ์ƒํƒœ๋กœ ์ „ํ™˜๋  ๋•Œ + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // ์”ฌ์ด ํฌ์–ด๊ทธ๋ผ์šด๋“œ๋กœ ์ „ํ™˜๋  ๋•Œ + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // ์”ฌ์ด ๋ฐฑ๊ทธ๋ผ์šด๋“œ๋กœ ์ „ํ™˜๋  ๋•Œ + } +} + diff --git a/Sopt_Appstore/Info.plist b/Sopt_Appstore/Info.plist new file mode 100644 index 0000000..4374efe --- /dev/null +++ b/Sopt_Appstore/Info.plist @@ -0,0 +1,30 @@ + + + + + BASE_URL + $(BASE_URL) + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/Sopt_Appstore/RootViewController.swift b/Sopt_Appstore/RootViewController.swift new file mode 100644 index 0000000..09931cf --- /dev/null +++ b/Sopt_Appstore/RootViewController.swift @@ -0,0 +1,77 @@ +// +// RootViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/28/24. +// + +import UIKit +import SnapKit +import Then +import SwiftUI + +class RootViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + setButtons() + } + + private func setButtons() { + let swiftUIButton = createButton( + title: "SwiftUI", + color: .systemBlue, + action: #selector(didTapButton1) + ) + let appStoreButton = createButton( + title: "App store", + color: .systemGreen, + action: #selector(didTapButton2) + ) + let serverButton = createButton( + title: "Server", + color: .systemRed, + action: #selector(didTapButton3) + ) + + let stackView = UIStackView(arrangedSubviews: [swiftUIButton, appStoreButton, serverButton]).then { + $0.axis = .vertical + $0.spacing = 20 + $0.alignment = .fill + } + + view.addSubview(stackView) + + stackView.snp.makeConstraints { + $0.center.equalToSuperview() + $0.width.equalToSuperview().multipliedBy(0.7) + } + } + + private func createButton(title: String, color: UIColor, action: Selector) -> UIButton { + return UIButton(type: .system).then { + $0.setTitle(title, for: .normal) + $0.setTitleColor(.white, for: .normal) + $0.backgroundColor = color + $0.layer.cornerRadius = 10 + $0.addTarget(self, action: action, for: .touchUpInside) + $0.snp.makeConstraints { make in + make.height.equalTo(50) + } + } + } + + @objc private func didTapButton3() { + navigationController?.pushViewController(RegisterViewController(), animated: true) + } + + @objc private func didTapButton2() { + navigationController?.pushViewController(TossViewController(), animated: true) + } + + @objc private func didTapButton1() { + let mainView = UIHostingController(rootView: MainView()) + navigationController?.pushViewController(mainView, animated: true) + } +} diff --git a/Sopt_Appstore/Server/DTO.swift b/Sopt_Appstore/Server/DTO.swift new file mode 100644 index 0000000..83aedcc --- /dev/null +++ b/Sopt_Appstore/Server/DTO.swift @@ -0,0 +1,34 @@ +// +// DTO.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import Foundation + + +struct RegisterRequest: Codable { + let username: String + let password: String + let hobby: String +} + +// ๋กœ๊ทธ์ธ ์‹œ ํ† ํฐ ๋ฐ˜ํ™˜ +struct LoginResponse: Codable { + struct Result: Codable { + let token: String + } + + let result: Result +} + +// ์ทจ๋ฏธ ์กฐํšŒ ๊ฒฐ๊ณผ +struct HobbyResponse: Codable { + struct Result: Codable { + + let hobby: String + } + let result: Result + +} diff --git a/Sopt_Appstore/Server/Environment.swift b/Sopt_Appstore/Server/Environment.swift new file mode 100644 index 0000000..88ec259 --- /dev/null +++ b/Sopt_Appstore/Server/Environment.swift @@ -0,0 +1,14 @@ +// +// Environment.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import Foundation + + +enum Environment { + static let baseURL: String = Bundle.main.infoDictionary?["BASE_URL"] as! String +} + diff --git a/Sopt_Appstore/Server/ErrorEnum.swift b/Sopt_Appstore/Server/ErrorEnum.swift new file mode 100644 index 0000000..f35687e --- /dev/null +++ b/Sopt_Appstore/Server/ErrorEnum.swift @@ -0,0 +1,53 @@ +// +// ErrorE.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import Foundation + + + + +enum NetworkError: Error { + case invalidURL + case invalidResponse + case invalidRequest + case decodingError + case networkError(Error) + case serverError + case unknownError + case duplicateError + case expressionError + case noUserFound + + var errorMessage: String { + switch self { + case .invalidURL: + return "์ž˜๋ชป๋œ URL์ž…๋‹ˆ๋‹ค" + case .invalidResponse: + return "์ž˜๋ชป๋œ ์‘๋‹ต์ž…๋‹ˆ๋‹ค" + case .invalidRequest: + return "์ž˜๋ชป๋œ ์š”์ฒญ์ž…๋‹ˆ๋‹ค." + case .decodingError: + return "๋ฐ์ดํ„ฐ ๋””์ฝ”๋”ฉ ์‹คํŒจ" + case .networkError(let error): + return "๋„คํŠธ์›Œํฌ ์˜ค๋ฅ˜: \(error.localizedDescription)" + case .serverError: + return "์„œ๋ฒ„ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค." + case .unknownError: + return "์•Œ ์ˆ˜ ์—†๋Š” ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค" + case .duplicateError: + return "์ค‘๋ณต ์—๋Ÿฌ์ž…๋‹ˆ๋‹ค" + case .expressionError: + return "ํ‘œํ˜„์‹ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค, 8์ž ์ด๋„ค๋กœ ์ž‘์„ฑํ•˜์„ธ์š”" + case .noUserFound: + return "์œ ์ €๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค" + } + } +} + +struct ErrorResponse: Decodable { + let code: String +} diff --git a/Sopt_Appstore/Server/LoginViewController.swift b/Sopt_Appstore/Server/LoginViewController.swift new file mode 100644 index 0000000..62ecafb --- /dev/null +++ b/Sopt_Appstore/Server/LoginViewController.swift @@ -0,0 +1,118 @@ +// +// LoginViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + + +import UIKit +import KeychainSwift +import SnapKit + +class LoginViewController: UIViewController { + + private let usernameTextField: UITextField = { + let textField = UITextField() + textField.placeholder = "์‚ฌ์šฉ์ž ์ด๋ฆ„" + textField.borderStyle = .roundedRect + return textField + }() + + private let passwordTextField: UITextField = { + let textField = UITextField() + textField.placeholder = "๋น„๋ฐ€๋ฒˆํ˜ธ" + textField.borderStyle = .roundedRect + textField.isSecureTextEntry = true + return textField + }() + + private let loginButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle("๋กœ๊ทธ์ธ", for: .normal) + button.addTarget(self, action: #selector(handleLogin), for: .touchUpInside) + return button + }() + + let keychain = KeychainSwift() + let userService = UserService() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + private func setupUI() { + view.backgroundColor = .white + + view.addSubview(usernameTextField) + view.addSubview(passwordTextField) + view.addSubview(loginButton) + + usernameTextField.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(100) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + } + + passwordTextField.snp.makeConstraints { make in + make.top.equalTo(usernameTextField.snp.bottom).offset(20) + make.leading.trailing.equalTo(usernameTextField) + } + + loginButton.snp.makeConstraints { make in + make.top.equalTo(passwordTextField.snp.bottom).offset(30) + make.centerX.equalToSuperview() + } + } + + @objc private func handleLogin() { + guard let username = usernameTextField.text, !username.isEmpty, + let password = passwordTextField.text, !password.isEmpty else { + showAlert(title: "์˜ค๋ฅ˜", message: "์‚ฌ์šฉ์ž ์ด๋ฆ„๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.") + return + } + + userService.login(username: username, password: password) { [weak self] result in + self?.handleLoginResponse(result: result) + } + } + + + func secureSaveToken(token: String) -> Bool { + return keychain.set(token, forKey: "userToken") + } +} + + +extension LoginViewController { + private func handleLoginResponse(result: Result) { + DispatchQueue.main.async { [weak self] in + guard let self = self else { return } + + switch result { + case .success(let token): + self.handleLoginSuccess(token: token) + case .failure(let error): + self.handleLoginFailure(error: error) + } + } + } + + private func handleLoginSuccess(token: String) { + + if secureSaveToken(token: token) { + showAlert(title: "์„ฑ๊ณต", message: "๋กœ๊ทธ์ธ ์„ฑ๊ณต!") { [weak self] in + guard let self = self else { return } + let queryViewController = QueryViewController() + self.navigationController?.pushViewController(queryViewController, animated: true) + } + } else { + showAlert(title: "์˜ค๋ฅ˜", message: "ํ† ํฐ ์ €์žฅ ์‹คํŒจ") + } + } + + private func handleLoginFailure(error: NetworkError) { + showAlert(title: "์˜ค๋ฅ˜", message: "๋กœ๊ทธ์ธ ์‹คํŒจ: \(error.errorMessage)") + } +} diff --git a/Sopt_Appstore/Server/QueryViewController.swift b/Sopt_Appstore/Server/QueryViewController.swift new file mode 100644 index 0000000..980bd7b --- /dev/null +++ b/Sopt_Appstore/Server/QueryViewController.swift @@ -0,0 +1,233 @@ +// +// QueryViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import UIKit +import KeychainSwift +import SnapKit +import SwiftUI + +class QueryViewController: UIViewController { + + private let userService = UserService() + private let keychain = KeychainSwift() + + private let userIdTextField = UITextField().then { + $0.placeholder = "์œ ์ € ๋ฒˆํ˜ธ ์ž…๋ ฅ" + $0.borderStyle = .roundedRect + $0.keyboardType = .numberPad + } + + private let passwordTextField = UITextField().then { + $0.placeholder = "๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ" + $0.borderStyle = .roundedRect + $0.isSecureTextEntry = true + } + + private let hobbyTextField = UITextField().then { + $0.placeholder = "์ทจ๋ฏธ ์ž…๋ ฅ" + $0.borderStyle = .roundedRect + } + + private let myHobbyButton = UIButton(type: .system).then { + $0.setTitle("๋‚ด ์ทจ๋ฏธ ์กฐํšŒ", for: .normal) + } + + private let myHobbyLabel = UILabel().then { + $0.text = "๋‚ด ์ทจ๋ฏธ ์กฐํšŒ ๊ฒฐ๊ณผ" + $0.textAlignment = .center + $0.numberOfLines = 0 + $0.textColor = .darkGray + } + + private let otherUserHobbyButton = UIButton(type: .system).then { + $0.setTitle("๋‹ค๋ฅธ ์œ ์ € ์ทจ๋ฏธ ์กฐํšŒ", for: .normal) + } + + private let otherUserHobbyLabel = UILabel().then { + $0.text = "๋‹ค๋ฅธ ์œ ์ € ์ทจ๋ฏธ ์กฐํšŒ ๊ฒฐ๊ณผ" + $0.textAlignment = .center + $0.numberOfLines = 0 + $0.textColor = .darkGray + } + + private let updateUserInfoButton = UIButton(type: .system).then { + $0.setTitle("์œ ์ € ์ •๋ณด ๋ณ€๊ฒฝ", for: .normal) + } + + private let updateUserInfoLabel = UILabel().then { + $0.text = "์œ ์ € ์ •๋ณด ๋ณ€๊ฒฝ ๊ฒฐ๊ณผ" + $0.textAlignment = .center + $0.numberOfLines = 0 + $0.textColor = .darkGray + } + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + setupButtonTargets() + } + + private func setupButtonTargets() { + myHobbyButton.addTarget(self, action: #selector(handleMyHobbyQuery), for: .touchUpInside) + otherUserHobbyButton.addTarget(self, action: #selector(handleOtherUserHobbyQuery), for: .touchUpInside) + updateUserInfoButton.addTarget(self, action: #selector(handleUpdateUserInfo), for: .touchUpInside) + } + + private func setupUI() { + view.backgroundColor = .white + + [userIdTextField, passwordTextField, hobbyTextField, myHobbyButton, myHobbyLabel, + otherUserHobbyButton, otherUserHobbyLabel, updateUserInfoButton, updateUserInfoLabel].forEach { + view.addSubview($0) + } + + userIdTextField.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide).offset(20) + $0.leading.trailing.equalToSuperview().inset(20) + } + + otherUserHobbyButton.snp.makeConstraints { + $0.top.equalTo(userIdTextField.snp.bottom).offset(20) + $0.centerX.equalToSuperview() + } + + otherUserHobbyLabel.snp.makeConstraints { + $0.top.equalTo(otherUserHobbyButton.snp.bottom).offset(10) + $0.leading.trailing.equalToSuperview().inset(20) + } + + passwordTextField.snp.makeConstraints { + $0.top.equalTo(otherUserHobbyLabel.snp.bottom).offset(20) + $0.leading.trailing.equalToSuperview().inset(20) + } + + hobbyTextField.snp.makeConstraints { + $0.top.equalTo(passwordTextField.snp.bottom).offset(20) + $0.leading.trailing.equalToSuperview().inset(20) + } + + updateUserInfoButton.snp.makeConstraints { + $0.top.equalTo(hobbyTextField.snp.bottom).offset(20) + $0.centerX.equalToSuperview() + } + + updateUserInfoLabel.snp.makeConstraints { + $0.top.equalTo(updateUserInfoButton.snp.bottom).offset(10) + $0.leading.trailing.equalToSuperview().inset(20) + } + + myHobbyButton.snp.makeConstraints { + $0.top.equalTo(updateUserInfoLabel.snp.bottom).offset(20) + $0.centerX.equalToSuperview() + } + + myHobbyLabel.snp.makeConstraints { + $0.top.equalTo(myHobbyButton.snp.bottom).offset(10) + $0.leading.trailing.equalToSuperview().inset(20) + } + } + + + private func getTokenOrShowError() -> String? { + guard let token = keychain.get("userToken") else { + showAlert(message: "์˜ค๋ฅ˜: ํ† ํฐ์ด ์—†์Šต๋‹ˆ๋‹ค. ๋‹ค์‹œ ๋กœ๊ทธ์ธํ•ด์ฃผ์„ธ์š”.") + return nil + } + return token + } + + @objc private func handleMyHobbyQuery() { + guard let token = getTokenOrShowError() else { return } + + userService.getMyHobby(token: token) { [weak self] result in + guard let self = self else { return } + + DispatchQueue.main.async { + switch result { + case .success(let hobby): + self.myHobbyLabel.text = "๋‚ด ์ทจ๋ฏธ: \(hobby)" + case .failure(let error): + self.myHobbyLabel.text = "์˜ค๋ฅ˜: ๋‚ด ์ทจ๋ฏธ ์กฐํšŒ ์‹คํŒจ - \(error.errorMessage)" + } + } + } + } + + @objc private func handleOtherUserHobbyQuery() { + guard let token = getTokenOrShowError() else { return } + guard let userNo = userIdTextField.text, !userNo.isEmpty else { + showAlert(message: "์˜ค๋ฅ˜: ์œ ์ € ID๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.") + return + } + + userService.getOtherUserHobby(token: token, userNo: userNo) { [weak self] result in + guard let self = self else { return } + + DispatchQueue.main.async { + switch result { + case .success(let hobby): + let message = "\(userNo)๋‹˜์˜ ์ทจ๋ฏธ๋Š” \(hobby)์ž…๋‹ˆ๋‹ค." + self.showAlert(message: message) + case .failure(let error): + self.showAlert(message: "์˜ค๋ฅ˜: ๋‹ค๋ฅธ ์œ ์ € ์ทจ๋ฏธ ์กฐํšŒ ์‹คํŒจ - \(error.errorMessage)") + } + } + } + } + + @objc private func handleUpdateUserInfo() { + guard let token = getTokenOrShowError() else { return } + + let newPassword = passwordTextField.text + let newHobby = hobbyTextField.text + + if (newPassword == nil || newPassword!.isEmpty) && (newHobby == nil || newHobby!.isEmpty) { + updateUserInfoLabel.text = "์˜ค๋ฅ˜: ๋ณ€๊ฒฝํ•  ๋น„๋ฐ€๋ฒˆํ˜ธ ๋˜๋Š” ์ทจ๋ฏธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”." + return + } + + userService.updateUserInfo(token: token, newPassword: newPassword, newHobby: newHobby) { [weak self] result in + guard let self = self else { return } + + DispatchQueue.main.async { + switch result { + case .success: + self.updateUserInfoLabel.text = "์œ ์ € ์ •๋ณด๊ฐ€ ์„ฑ๊ณต์  ๋ณ€๊ฒฝ." + case .failure(let error): + self.updateUserInfoLabel.text = "์˜ค๋ฅ˜: ์œ ์ € ์ •๋ณด ๋ณ€๊ฒฝ ์‹คํŒจ - \(error.errorMessage)" + } + } + } + } + + private func showAlert(message: String, completion: (() -> Void)? = nil) { + let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "ํ™•์ธ", style: .default) { _ in + completion?() + }) + present(alertController, animated: true) + } + } + + struct QueryViewController_Previews: PreviewProvider { + static var previews: some View { + UIViewControllerPreview { + QueryViewController() + } + } + } + + // UIViewControllerPreview Helper + struct UIViewControllerPreview: UIViewControllerRepresentable { + let viewController: () -> UIViewController + + func makeUIViewController(context: Context) -> UIViewController { + return viewController() + } + + func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} + } diff --git a/Sopt_Appstore/Server/RegisterViewController.swift b/Sopt_Appstore/Server/RegisterViewController.swift new file mode 100644 index 0000000..78b5e48 --- /dev/null +++ b/Sopt_Appstore/Server/RegisterViewController.swift @@ -0,0 +1,104 @@ +// +// RegisterViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import UIKit +import SnapKit + +class RegisterViewController: UIViewController { + + private let usernameTextField: UITextField = { + let textField = UITextField() + textField.placeholder = "์‚ฌ์šฉ์ž ์ด๋ฆ„" + textField.borderStyle = .roundedRect + return textField + }() + + private let passwordTextField: UITextField = { + let textField = UITextField() + textField.placeholder = "๋น„๋ฐ€๋ฒˆํ˜ธ" + textField.borderStyle = .roundedRect + textField.isSecureTextEntry = true + return textField + }() + + private let hobbyTextField: UITextField = { + let textField = UITextField() + textField.placeholder = "์ทจ๋ฏธ" + textField.borderStyle = .roundedRect + return textField + }() + + private let registerButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle("ํšŒ์› ๋“ฑ๋ก", for: .normal) + button.addTarget(self, action: #selector(handleRegister), for: .touchUpInside) + return button + }() + + let userService = UserService() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + private func setupUI() { + view.backgroundColor = .white + + view.addSubview(usernameTextField) + view.addSubview(passwordTextField) + view.addSubview(hobbyTextField) + view.addSubview(registerButton) + + usernameTextField.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(100) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + } + + passwordTextField.snp.makeConstraints { make in + make.top.equalTo(usernameTextField.snp.bottom).offset(20) + make.leading.trailing.equalTo(usernameTextField) + } + + hobbyTextField.snp.makeConstraints { make in + make.top.equalTo(passwordTextField.snp.bottom).offset(20) + make.leading.trailing.equalTo(usernameTextField) + } + + registerButton.snp.makeConstraints { make in + make.top.equalTo(hobbyTextField.snp.bottom).offset(30) + make.centerX.equalToSuperview() + } + } + + @objc private func handleRegister() { + guard let username = usernameTextField.text, !username.isEmpty, + let password = passwordTextField.text, !password.isEmpty, + let hobby = hobbyTextField.text, !hobby.isEmpty else { + showAlert(title: "์˜ค๋ฅ˜", message: "๋ชจ๋“  ํ•„๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.") + return + } + + userService.register(username: username, password: password, hobby: hobby) { [weak self] result in + guard let self = self else { return } + + DispatchQueue.main.async { + switch result { + case .success: + self.showAlert(title: "์„ฑ๊ณต", message: "ํšŒ์›๋“ฑ๋ก ์„ฑ๊ณต!") { + let loginViewController = LoginViewController() + self.navigationController?.pushViewController(loginViewController, animated: true) + } + case .failure(let error): + self.showAlert(title: "์˜ค๋ฅ˜", message: "ํšŒ์›๋“ฑ๋ก ์‹คํŒจ: \(error.errorMessage)") + } + } + } + } + +} diff --git a/Sopt_Appstore/Server/UserService.swift b/Sopt_Appstore/Server/UserService.swift new file mode 100644 index 0000000..0501854 --- /dev/null +++ b/Sopt_Appstore/Server/UserService.swift @@ -0,0 +1,251 @@ +// +// UserService.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/8/24. +// + +import Foundation +import KeychainSwift +import Alamofire + + + +class UserService { + + func register( + username: String, + password: String, + hobby: String, + completion: @escaping (Result) -> Void + ) { + + + let url = Environment.baseURL + "/user" + + let parameters = RegisterRequest( + username: username, + password: password, + hobby: hobby + ) + + AF.request( + url, + method: .post, + parameters: parameters, + encoder: JSONParameterEncoder.default + ) + .validate() + .response { [weak self] response in + + guard let statusCode = response.response?.statusCode, + let data = response.data, + let self + else { + completion(.failure(.unknownError)) + return + } + + switch response.result { + case .success: + completion(.success(true)) + case .failure: + let error = self.handleStatusCode(statusCode, data: data) + completion(.failure(error)) + } + } + } + + /// ๋กœ๊ทธ์ธ API ๋ฉ”์„œ๋“œ + func login(username: String, password: String, completion: @escaping (Result) -> Void) { + let url = Environment.baseURL + "/login" + + + let parameters: [String: String] = ["username": username, "password": password] + + AF.request( + url, + method: .post, + parameters: parameters, + encoder: JSONParameterEncoder.default + ) + .validate() + .responseDecodable(of: LoginResponse.self) { [weak self] response in + guard let statusCode = response.response?.statusCode, + let data = response.data, + let self = self else { + completion(.failure(.unknownError)) + return + } + + + switch response.result { + + case .success(let loginResponse): + completion(.success(loginResponse.result.token)) + + case .failure: + let error = self.handleStatusCode(statusCode, data: data) + completion(.failure(error)) + } + + } + } + + + /// ๋‚ด ์ทจ๋ฏธ ์กฐํšŒ ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€ + func getMyHobby(token: String, completion: @escaping (Result) -> Void) { + let url = Environment.baseURL + "/user/my-hobby" + let headers: HTTPHeaders = ["token": token] + + AF.request( + url, + method: .get, + headers: headers + ) + .validate() + .responseDecodable(of: HobbyResponse.self) { [weak self] response in + guard let statusCode = response.response?.statusCode, + let data = response.data, + let self = self else { + completion(.failure(.unknownError)) + return + } + + switch response.result { + case .success(let hobbyResponse): + + completion(.success(hobbyResponse.result.hobby)) + case .failure: + + let error = self.handleStatusCode(statusCode, data: data) + completion(.failure(error)) + } + } + } + + + /// ๋‹ค๋ฅธ ์‚ฌ๋žŒ ์ทจ๋ฏธ ์กฐํšŒ ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€ + func getOtherUserHobby(token: String, userNo: String, completion: @escaping (Result) -> Void) { + + let url = Environment.baseURL + "/user/" + userNo + "/hobby" + + let headers: HTTPHeaders = ["token": token] + + AF.request( + url, + method: .get, + headers: headers + ) + .validate() + .responseDecodable(of: HobbyResponse.self) { [weak self] response in + guard let statusCode = response.response?.statusCode, + let data = response.data, + let self = self else { + completion(.failure(.unknownError)) + return + } + + switch response.result { + case .success(let hobbyResponse): + completion(.success(hobbyResponse.result.hobby)) + case .failure: + let error = self.handleStatusCode(statusCode, data: data) + completion(.failure(error)) + } + } + } + + /// ์œ ์ € ์ •๋ณด ๋ณ€๊ฒฝ ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€ + func updateUserInfo(token: String, newPassword: String?, newHobby: String?, completion: @escaping (Result) -> Void) { + let url = Environment.baseURL + "/user" + let headers: HTTPHeaders = ["token": token] + + var parameters: [String: String] = [:] + + if let newHobby = newHobby, !newHobby.isEmpty { + parameters["hobby"] = newHobby + } + if let newPassword = newPassword, !newPassword.isEmpty { + parameters["password"] = newPassword + } + + AF.request( + url, + method: .put, + parameters: parameters, + encoder: JSONParameterEncoder.default, + headers: headers + ) + .validate() + .response { [weak self] response in + guard let self = self else { + completion(.failure(.unknownError)) + return + } + + let statusCode = response.response?.statusCode + + if let statusCode = statusCode { + + if statusCode == 200 { + completion(.success(true)) + return + } + } else { + completion(.failure(.unknownError)) + return + } + + + guard let data = response.data else { + completion(.failure(.unknownError)) + return + } + + guard let statusCode = statusCode else { + completion(.failure(.unknownError)) + return + } + + let error = self.handleStatusCode(statusCode, data: data) + completion(.failure(error)) + + } + + + } + + + + func handleStatusCode(_ statusCode: Int, data: Data) -> NetworkError { + let errorCode = decodeError(data: data) + switch (statusCode, errorCode) { + case (400, "00"): + return .invalidRequest // ์ž˜๋ชป๋œ ์š”์ฒญ + case (400, "01"): + return .expressionError // ์œ ์ €๋ช…, ๋น„๋ฐ€๋ฒˆํ˜ธ, ์ทจ๋ฏธ๊ฐ€ 8์ž ์ดˆ๊ณผ + case (403, "01"): + return .invalidResponse // ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ‹€๋ฆผ + case (404, "00"): + return .invalidURL // ์ž˜๋ชป๋œ path + case (404, "01"): + return .noUserFound // ์œ ์ €๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ + case (409, "00"): + return .duplicateError // ์ค‘๋ณต ์—๋Ÿฌ + default: + return .unknownError + } + } + + + func decodeError(data: Data) -> String { + guard let errorResponse = try? JSONDecoder().decode( + ErrorResponse.self, + from: data + ) else { return "" } + return errorResponse.code + } + + +} diff --git a/Sopt_Appstore/SwiftUI/Model/HeadScrollViewRowData.swift b/Sopt_Appstore/SwiftUI/Model/HeadScrollViewRowData.swift new file mode 100644 index 0000000..8c244d6 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/Model/HeadScrollViewRowData.swift @@ -0,0 +1,22 @@ +// +// Model.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import Foundation + +struct HeadScrollViewRowData: Identifiable { + + let id = UUID() + let title: String + let subtitle: String + let overlayTitle: String + let overlaySubtitle: String + let buttonText: String + let purchaseText: String + let backgroundImage: String + let overlayIcon: String + +} diff --git a/Sopt_Appstore/SwiftUI/Model/SwiftUIApp.swift b/Sopt_Appstore/SwiftUI/Model/SwiftUIApp.swift new file mode 100644 index 0000000..012f70d --- /dev/null +++ b/Sopt_Appstore/SwiftUI/Model/SwiftUIApp.swift @@ -0,0 +1,19 @@ +// +// ใ„ดใ„ดใ„ด.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +struct SwiftUIApp: Identifiable, Hashable { + let id = UUID() + let iconImage: UIImage + let title: String + let downloadState: DownloadState + let subTitle: String + let category: String + var ranking: Int +} + diff --git a/Sopt_Appstore/SwiftUI/Model/Tap.swift b/Sopt_Appstore/SwiftUI/Model/Tap.swift new file mode 100644 index 0000000..c885f27 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/Model/Tap.swift @@ -0,0 +1,12 @@ +// +// Tap.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/28/24. +// + +import Foundation + +enum Tab { + case left, center, right +} diff --git a/Sopt_Appstore/SwiftUI/View/AppBoxView/AppSectionBoxView.swift b/Sopt_Appstore/SwiftUI/View/AppBoxView/AppSectionBoxView.swift new file mode 100644 index 0000000..22a2734 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/AppBoxView/AppSectionBoxView.swift @@ -0,0 +1,64 @@ +// +// AppSectionBoxView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +struct AppSectionBoxView: View { + + @ObservedObject var viewModel: NavigationViewModel + + let headerTitle: String + let headerDescript: String + + let apps: [SwiftUIApp] + + let columns = Array(repeating: GridItem(.flexible(), spacing: 8), count: 1) + + var body: some View { + VStack(alignment: .leading, spacing: 0) { + + HStack{ + + Text(headerTitle) + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(.leading) + + NavigationLink(destination: AppChartView(viewModel:viewModel)) { + Image(systemName: "chevron.right") + .foregroundColor(.gray) + } + + } + + Text(headerDescript) + .font(.caption) + .foregroundStyle(.gray) + .padding(.leading) + + TabView { + ForEach(paginate(apps: apps, itemsPerPage: 3), id: \.self) { pageApps in + LazyVGrid(columns: columns, spacing: 6) { + ForEach(pageApps) { app in + HomeAppRow(app: app) + + } + } + .padding(.horizontal) + } + } + .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never)) + } + } + + private func paginate(apps: [SwiftUIApp], itemsPerPage: Int) -> [[SwiftUIApp]] { + stride(from: 0, to: apps.count, by: itemsPerPage).map { + Array(apps[$0.. TossViewController { + return TossViewController() + } + + func updateUIViewController(_ uiViewController: TossViewController, context: Context) { + } +} diff --git a/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabView.swift b/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabView.swift new file mode 100644 index 0000000..ece69ec --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabView.swift @@ -0,0 +1,35 @@ +// +// HeadScrollview.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +struct HeadTabView: View { + + @ObservedObject var viewModel: HeadTabviewViewViewModel + + var body: some View { + TabView { + ForEach(viewModel.rows) { row in + HeadTabViewRow( + title: row.title, + subtitle: row.subtitle, + overlayTitle: row.overlayTitle, + overlaySubtitle: row.overlaySubtitle, + buttonText: row.buttonText, + purchaseText: row.purchaseText, + backgroundImage: row.backgroundImage, + overlayIcon: row.overlayIcon + ) + .frame(width: UIScreen.main.bounds.width - 30) + .padding(.horizontal, 15) + } + } + .tabViewStyle(PageTabViewStyle(indexDisplayMode: .always)) + .frame(height: 300) + } +} + diff --git a/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabViewRow.swift b/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabViewRow.swift new file mode 100644 index 0000000..47a0112 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/HeadView/HeadTabViewRow.swift @@ -0,0 +1,87 @@ +// +// HeadHorizenScrollView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +struct HeadTabViewRow: View { + var title: String + var subtitle: String + var overlayTitle: String + var overlaySubtitle: String + var buttonText: String + var purchaseText: String + var backgroundImage: String + var overlayIcon: String + + var body: some View { + VStack(alignment: .leading, spacing: 10) { + Text("ๆ–ฐใ—ใ„็ตŒ้จ“") + .font(.system(size: 10, weight: .bold)) + .foregroundColor(.blue) + + Text(title) + .font(.system(size: 18, weight: .bold)) + .foregroundColor(.white) + + Text(subtitle) + .font(.system(size: 14)) + .foregroundColor(.gray) + + ZStack(alignment: .bottomLeading) { + Image(backgroundImage) + .resizable() + .aspectRatio(contentMode: .fill) + .frame(height: 200) + .cornerRadius(10) + .clipped() + + VStack(alignment: .leading, spacing: -35) { + HStack { + Image(overlayIcon) + .resizable() + .frame(width: 40, height: 40) + .cornerRadius(10) + + VStack(alignment: .leading) { + Text(overlayTitle) + .font(.system(size: 14)) + .foregroundColor(.white) + Text(overlaySubtitle) + .font(.system(size: 10)) + .foregroundColor(.white) + } + } + + HStack { + Spacer() + VStack { + Button(action: { + print("\(title) button tapped") + }) { + Text(buttonText) + .font(.system(size: 14, weight: .bold)) + .foregroundColor(.blue) + .padding(.horizontal, 20) + .padding(.vertical, 8) + .background(Color.white) + .cornerRadius(10) + } + Text(purchaseText) + .font(.system(size: 10)) + .foregroundColor(.white) + } + } + } + .padding() + } + } + .padding(.horizontal) + .background(Color.black) + } +} + + diff --git a/Sopt_Appstore/SwiftUI/View/MainView.swift b/Sopt_Appstore/SwiftUI/View/MainView.swift new file mode 100644 index 0000000..49edcc7 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/MainView.swift @@ -0,0 +1,110 @@ +// +// MainView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/27/24. +// + +import SwiftUI + +struct MainView: View { + + @State private var selected: Tab = .left + @StateObject private var navigationViewModel = NavigationViewModel() + + var body: some View { + NavigationStack { + ZStack { + + + if selected == .left { + FinanceView(viewModel: navigationViewModel) + .toolbar(.hidden, for: .tabBar) + } else if selected == .center { + AppChartView(viewModel: navigationViewModel) + .toolbar(.hidden, for: .tabBar) + } else if selected == .right { + DefaultView2() + .toolbar(.hidden, for: .tabBar) + } + + + + VStack { + Spacer() + if !navigationViewModel.isNavigating { + tabBar + } + } + } + .background(Color.black) + + }.navigationBarBackButtonHidden(true) + + } + var tabBar: some View { + HStack { + Spacer() + Button { + selected = .left + } label: { + VStack(alignment: .center) { + Image(systemName: "house.fill") + .resizable() + .scaledToFit() + .frame(width: 22) + if selected == .left { + Text("ํˆฌ๋ฐ์ด") + .font(.system(size: 11)) + } + } + } + .foregroundStyle(selected == .left ? Color.accentColor : Color.gray) + Spacer() + Button { + selected = .center + } label: { + VStack(alignment: .center) { + Image(systemName: "app.fill") + .resizable() + .scaledToFit() + .frame(width: 22) + if selected == .center { + Text("์•ฑ") + .font(.system(size: 11)) + } + } + } + .foregroundStyle(selected == .center ? Color.accentColor : Color.gray) + Spacer() + Button { + selected = .right + } label: { + VStack(alignment: .center) { + Image(systemName: "cube.box.fill") + .resizable() + .scaledToFit() + .frame(width: 22) + if selected == .right { + Text("์•„์ผ€์ด๋“œ") + .font(.system(size: 11)) + } + } + } + .foregroundStyle(selected == .right ? Color.accentColor : Color.gray) + Spacer() + } + .padding() + .frame(height: 72) + .background { + RoundedRectangle(cornerRadius: 24) + .fill(Color(red: 22/255, green: 22/255, blue: 24/255).opacity(0.95)) + .shadow(color: .white.opacity(0.15), radius: 8, y: 2) + } + .padding(.horizontal) + } +} + +#Preview { + MainView() +} diff --git a/Sopt_Appstore/SwiftUI/View/NavigtionView/DefalutView.swift b/Sopt_Appstore/SwiftUI/View/NavigtionView/DefalutView.swift new file mode 100644 index 0000000..b0b0a38 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/NavigtionView/DefalutView.swift @@ -0,0 +1,38 @@ +// +// DefalutView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/28/24. +// + +import SwiftUI + +struct DefaultView: View { + var body: some View { + ZStack { + Color.black + .ignoresSafeArea() + + VStack { + Text("muyahoใ€œใ€œใ€œ") + .foregroundColor(.white) + .font(.largeTitle) + } + } + } +} + +struct DefaultView2: View { + var body: some View { + ZStack { + Color.black + .ignoresSafeArea() + + VStack { + Text("muyahoใ€œใ€œใ€œ") + .foregroundColor(.white) + .font(.title) + } + } + } +} diff --git a/Sopt_Appstore/SwiftUI/View/NavigtionView/EntertainmentView.swift b/Sopt_Appstore/SwiftUI/View/NavigtionView/EntertainmentView.swift new file mode 100644 index 0000000..da12e15 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/View/NavigtionView/EntertainmentView.swift @@ -0,0 +1,37 @@ +// +// ne.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/28/24. +// + +import SwiftUI + +struct EntertainmentView: View { + let app: App + + var body: some View { + HStack{ + Spacer() + VStack { + Image(uiImage: app.iconImage) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 100, height: 100) + + Text("์•ฑ ์ด๋ฆ„: \(app.title)") + .font(.title) + .padding() + + Text("์นดํ…Œ๊ณ ๋ฆฌ: \(app.category)") + .font(.headline) + + Spacer() + } + Spacer() + } + .padding() + .background(Color.black.ignoresSafeArea()) + .foregroundColor(.white) + } +} diff --git a/Sopt_Appstore/SwiftUI/ViewModel/HeadTabviewViewViewModel.swift b/Sopt_Appstore/SwiftUI/ViewModel/HeadTabviewViewViewModel.swift new file mode 100644 index 0000000..d1498b3 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/ViewModel/HeadTabviewViewViewModel.swift @@ -0,0 +1,52 @@ +// +// ViewModel.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +class HeadTabviewViewViewModel: ObservableObject { + + @Published var rows: [HeadScrollViewRowData] = [] + + init() { + fetchRows() + } + + func fetchRows() { + rows = [ + HeadScrollViewRowData( + title: "Fortune City - A Finance App", + subtitle: "๊ฒŒ์ž„์„ ํ•˜๋“ฏ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€๊ณ„๋ถ€", + overlayTitle: "ๆŠ–้Ÿณ", + overlaySubtitle: "ๆŠ–้Ÿณๆ˜ฏไธ€ๆฌพๆต่กŒ็š„็Ÿญ่ง†้ข‘ๅบ”็”จ็จ‹ๅบ", + buttonText: "๋ฐ›๊ธฐ", + purchaseText: "์•ฑ ๋‚ด ๊ตฌ์ž…", + backgroundImage: "background", + overlayIcon: "tictokIcon" + ), + HeadScrollViewRowData( + title: "Fortune City - A Finance App", + subtitle: "๊ฒŒ์ž„์„ ํ•˜๋“ฏ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€๊ณ„๋ถ€", + overlayTitle: "ๆŠ–้Ÿณ", + overlaySubtitle: "ๆŠ–้Ÿณๆ˜ฏไธ€ๆฌพๆต่กŒ็š„็Ÿญ่ง†้ข‘ๅบ”็”จ็จ‹ๅบ", + buttonText: "๋ฐ›๊ธฐ", + purchaseText: "์•ฑ ๋‚ด ๊ตฌ์ž…", + backgroundImage: "background", + overlayIcon: "tictokIcon" + ), + HeadScrollViewRowData( + title: "Fortune City - A Finance App", + subtitle: "๊ฒŒ์ž„์„ ํ•˜๋“ฏ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€๊ณ„๋ถ€", + overlayTitle: "ๆŠ–้Ÿณ", + overlaySubtitle: "ๆŠ–้Ÿณๆ˜ฏไธ€ๆฌพๆต่กŒ็š„็Ÿญ่ง†้ข‘ๅบ”็”จ็จ‹ๅบ", + buttonText: "๋ฐ›๊ธฐ", + purchaseText: "์•ฑ ๋‚ด ๊ตฌ์ž…", + backgroundImage: "background", + overlayIcon: "tictokIcon" + ) + ] + } +} diff --git a/Sopt_Appstore/SwiftUI/ViewModel/NavigationViewModel.swift b/Sopt_Appstore/SwiftUI/ViewModel/NavigationViewModel.swift new file mode 100644 index 0000000..6391c01 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/ViewModel/NavigationViewModel.swift @@ -0,0 +1,12 @@ +// +// NavigationViewModel.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +class NavigationViewModel: ObservableObject { + @Published var isNavigating: Bool = false +} diff --git a/Sopt_Appstore/SwiftUI/ViewModel/SwiftUIAppViewModel.swift b/Sopt_Appstore/SwiftUI/ViewModel/SwiftUIAppViewModel.swift new file mode 100644 index 0000000..6069e89 --- /dev/null +++ b/Sopt_Appstore/SwiftUI/ViewModel/SwiftUIAppViewModel.swift @@ -0,0 +1,60 @@ +// +// SwiftUIAppViewModel.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 12/3/24. +// + +import SwiftUI + +class SwiftUIAppViewModel: ObservableObject { + @Published private(set) var apps: [SwiftUIApp] = [] + + init() { + fetchApps() + } + + private func fetchApps() { + apps = [ + SwiftUIApp(iconImage: UIImage(named: "Toss_App_Icon")!, title: "ํ† ์Šค", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "browsing", ranking: 1), + SwiftUIApp(iconImage: UIImage(named: "2")!, title: "Books", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "education", ranking: 2), + SwiftUIApp(iconImage: UIImage(named: "3")!, title: "Clock", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 3), + SwiftUIApp(iconImage: UIImage(named: "4")!, title: "App Store", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "shopping", ranking: 4), + SwiftUIApp(iconImage: UIImage(named: "5")!, title: "iTunes", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "music", ranking: 5), + SwiftUIApp(iconImage: UIImage(named: "6")!, title: "Contacts", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 6), + SwiftUIApp(iconImage: UIImage(named: "7")!, title: "Podcasts", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "entertainment", ranking: 7), + SwiftUIApp(iconImage: UIImage(named: "8")!, title: "Calculator", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 8), + SwiftUIApp(iconImage: UIImage(named: "9")!, title: "Camera", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "photo & video", ranking: 9), + SwiftUIApp(iconImage: UIImage(named: "10")!, title: "Compass", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 10), + SwiftUIApp(iconImage: UIImage(named: "11")!, title: "Mail", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "productivity", ranking: 11), + SwiftUIApp(iconImage: UIImage(named: "12")!, title: "Voice Memos", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 12), + SwiftUIApp(iconImage: UIImage(named: "13")!, title: "Apple TV", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "entertainment", ranking: 13), + SwiftUIApp(iconImage: UIImage(named: "14")!, title: "Settings", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 14), + SwiftUIApp(iconImage: UIImage(named: "15")!, title: "Tips", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "education", ranking: 15), + SwiftUIApp(iconImage: UIImage(named: "16")!, title: "News", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "news", ranking: 16), + SwiftUIApp(iconImage: UIImage(named: "17")!, title: "Phone", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "communication", ranking: 17), + SwiftUIApp(iconImage: UIImage(named: "18")!, title: "Safari", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "browsing", ranking: 18), + SwiftUIApp(iconImage: UIImage(named: "tictokIcon")!, title: "ๆŠ–้Ÿณ", downloadState: .dawnload, subTitle: "ๅ…ฅๆ‰‹", category: "browsing", ranking: 19), + SwiftUIApp(iconImage: UIImage(named: "1")!, title: "Home", downloadState: .dawnload, subTitle: "๋‹ค์šด", category: "utilities", ranking: 20) + ] + } + + func filterApps(by category: String) -> [SwiftUIApp] { + apps + .filter { $0.category == category } + .enumerated() + .map { index, app in + var updatedApp = app + updatedApp.ranking = index + 1 + return updatedApp + } + } + + func sortAppsByRanking() -> [SwiftUIApp] { + apps.sorted { $0.ranking < $1.ranking } + } + + func sortAppsByDownloadState() -> [SwiftUIApp] { + apps.sorted { $0.downloadState.rawValue < $1.downloadState.rawValue } + } +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/HeaderViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/HeaderViewController.swift new file mode 100644 index 0000000..5ecf856 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/HeaderViewController.swift @@ -0,0 +1,103 @@ +// +// HeaderViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +import UIKit +import SnapKit + +final class HeaderViewController: UIViewController { + + private let appIconImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "Toss_App_Icon") + imageView.contentMode = .scaleAspectFit + imageView.layer.cornerRadius = 12 + imageView.clipsToBounds = true + return imageView + }() + + private let appNameLabel: UILabel = { + let label = UILabel() + label.text = "ํ† ์Šค" + label.font = UIFont.boldSystemFont(ofSize: 24) + label.textColor = .white + return label + }() + + private let appDescriptionLabel: UILabel = { + let label = UILabel() + label.text = "๊ธˆ์œต์ด ์‰ฌ์›Œ์ง„๋‹ค" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .gray + return label + }() + + private let updateButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle("์—…๋ฐ์ดํŠธ", for: .normal) + button.setTitleColor(.white, for: .normal) + button.backgroundColor = .systemBlue + button.layer.cornerRadius = 15 + return button + }() + + private let shareButton: UIButton = { + let button = UIButton(type: .system) + let shareImage = UIImage(systemName: "square.and.arrow.up") + button.setImage(shareImage, for: .normal) + button.tintColor = .systemBlue + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + func setupUI() { + + view.backgroundColor = .black + + [appIconImageView, appNameLabel, appDescriptionLabel, updateButton, shareButton].forEach { + view.addSubview($0) + } + + + appIconImageView.snp.makeConstraints { make in + make.leading.equalTo(view.safeAreaLayoutGuide).offset(20) + make.top.equalTo(view.safeAreaLayoutGuide).offset(20) + make.width.height.equalTo(100) + } + + appNameLabel.snp.makeConstraints { make in + make.leading.equalTo(appIconImageView.snp.trailing).offset(20) + make.top.equalTo(appIconImageView.snp.top) + } + + + appDescriptionLabel.snp.makeConstraints { make in + make.leading.equalTo(appIconImageView.snp.trailing).offset(20) + make.top.equalTo(appNameLabel.snp.bottom).offset(5) + } + + + updateButton.snp.makeConstraints { make in + make.leading.equalTo(appIconImageView.snp.trailing).offset(20) + make.bottom.equalTo(appIconImageView.snp.bottom) + make.width.equalTo(80) + make.height.equalTo(30) + } + + + shareButton.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.bottom.equalTo(appIconImageView.snp.bottom) + make.width.height.equalTo(30) + } + } +} + +#Preview { + HeaderViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/InfoViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/InfoViewController.swift new file mode 100644 index 0000000..2cd826a --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/InfoViewController.swift @@ -0,0 +1,164 @@ +// +// InfoViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// +import UIKit +import SnapKit + +class InfoViewController: UIViewController { + + private let infoLabel: UILabel = { + let label = UILabel() + label.text = "ํ† ์Šค๋ฑ…ํฌ, ํ† ์Šค์ฆ๊ถŒ ์„œ๋น„์Šค๋ฅผ ์ด์šฉํ•˜์‹œ๋ ค๋ฉด ํ† ์Šค ์•ฑ ์„ค์น˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค." + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .white + label.numberOfLines = 0 + return label + }() + + private let bulletLabel: UILabel = { + let label = UILabel() + label.text = "โ— ๋‚ด ๊ธˆ์œต ํ˜„ํ™ฉ์„ ํ•œ๋ˆˆ์—, ํ™ˆยท์†Œ๋น„" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .white + return label + }() + + private let accountInfoLabel: UILabel = { + let label = UILabel() + label.text = "ยท ๋ชจ๋“  ๊ณ„์ขŒ์˜ ๋ชจ๋“  ์ •๋ณด๋ฅผ ํ•œ ๊ณณ์—์„œ, ๋”ฐ๋กœ ๋ณด์˜€๋˜ ์˜ˆ์ ๊ธˆ, ์ฒญ์•ฝ" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + label.numberOfLines = 0 + return label + }() + + private let moreInfoButton: UIButton = { + let button = UIButton(type: .system) + let attributedString = NSMutableAttributedString(string: " ๋” ๋ณด๊ธฐ") + attributedString.addAttribute(.foregroundColor, value: UIColor.systemBlue, range: NSRange(location: 0, length: attributedString.length)) + button.setAttributedTitle(attributedString, for: .normal) + button.titleLabel?.font = UIFont.systemFont(ofSize: 14) + button.contentHorizontalAlignment = .left + return button + }() + + private let developerLabel: UILabel = { + let label = UILabel() + let attributedString = NSMutableAttributedString(string: "Viva Republica") + attributedString.addAttribute(.foregroundColor, value: UIColor.systemBlue, range: NSRange(location: 0, length: attributedString.length)) + label.attributedText = attributedString + label.font = UIFont.systemFont(ofSize: 14) + return label + }() + + private let developerInfoLabel: UILabel = { + let label = UILabel() + label.text = "๊ฐœ๋ฐœ์ž" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + return label + }() + + private let chevronButton: UIButton = { + let button = UIButton(type: .system) + let chevronImage = UIImage(systemName: "chevron.right") + button.setImage(chevronImage, for: .normal) + button.tintColor = .gray + return button + }() + + + + + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + + setupUI() + + applyGradientMaskToLabel(accountInfoLabel) + + } + + + + + + private func setupUI() { + view.addSubview(infoLabel) + view.addSubview(bulletLabel) + view.addSubview(accountInfoLabel) + view.addSubview(moreInfoButton) + view.addSubview(developerLabel) + view.addSubview(developerInfoLabel) + view.addSubview(chevronButton) + + infoLabel.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(20) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + } + + bulletLabel.snp.makeConstraints { make in + make.top.equalTo(infoLabel.snp.bottom).offset(10) + make.leading.equalTo(infoLabel) + make.trailing.equalToSuperview().offset(-20) + } + + accountInfoLabel.snp.makeConstraints { make in + make.top.equalTo(bulletLabel.snp.bottom).offset(10) + make.leading.equalTo(bulletLabel) + make.trailing.equalToSuperview().offset(-20) + } + + moreInfoButton.snp.makeConstraints { make in + make.centerY.equalTo(accountInfoLabel) + + make.trailing.equalToSuperview().offset(-20) + } + + developerLabel.snp.makeConstraints { make in + make.top.equalTo(moreInfoButton.snp.bottom).offset(15) + make.leading.equalTo(infoLabel) + } + + developerInfoLabel.snp.makeConstraints { make in + make.leading.equalTo(developerLabel.snp.trailing).offset(10) + make.bottom.equalTo(developerLabel.snp.bottom) + } + + chevronButton.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalTo(developerLabel) + make.width.height.equalTo(20) + } + } + private func applyGradientMaskToLabel(_ label: UILabel) { + let gradientLayer = CAGradientLayer() + gradientLayer.colors = [UIColor.lightGray.cgColor, UIColor.clear.cgColor] + gradientLayer.locations = [0.7, 1.0] + gradientLayer.startPoint = CGPoint(x: 0, y: 0.5) + gradientLayer.endPoint = CGPoint(x: 1, y: 0.5) + gradientLayer.frame = label.bounds + + label.layer.mask = gradientLayer + } + + + + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + + applyGradientMaskToLabel(accountInfoLabel) + + } + +} + +#Preview { + InfoViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewScroll View.swift b/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewScroll View.swift new file mode 100644 index 0000000..c1b3ac2 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewScroll View.swift @@ -0,0 +1,74 @@ +// +// PreviewScroll.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// +import UIKit +import SnapKit + +class PreviewScrollView: UIView { + + private let scrollView = UIScrollView() + private let stackView = UIStackView() + + + private let imageNames = ["tossPreview1", "tossPreview2", "tossPreview3", "tossPreview4"] + + override init(frame: CGRect) { + super.init(frame: frame) + setupScrollView() + setupImages() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setupScrollView() { + addSubview(scrollView) + scrollView.addSubview(stackView) + + scrollView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + scrollView.showsHorizontalScrollIndicator = false + + + + stackView.axis = .horizontal + stackView.distribution = .equalSpacing + stackView.alignment = .fill + stackView.spacing = 30 + + stackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.height.equalToSuperview() + } + } + + private func setupImages() { + for imageName in imageNames { + + let imageView = UIImageView() + imageView.image = UIImage(named: imageName) + imageView.contentMode = .scaleAspectFill + imageView.clipsToBounds = true + imageView.layer.cornerRadius = 30 + + + imageView.snp.makeConstraints { make in + make.width.equalTo(270) + make.height.equalTo(550) + } + + + + stackView.addArrangedSubview(imageView) + } + } +} + +#Preview { + PreviewScrollView() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewViewController.swift new file mode 100644 index 0000000..a4595c0 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/PreViewScrollView/PreviewViewController.swift @@ -0,0 +1,84 @@ +// +// PreviewViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + +import UIKit +import SnapKit + +class PreviewViewController: UIViewController { + + private let previewImageView = PreviewScrollView() + + private let titleLabel: UILabel = { + let label = UILabel() + label.text = "๋ฏธ๋ฆฌ ๋ณด๊ธฐ" + label.font = UIFont.boldSystemFont(ofSize: 20) + label.textColor = .white + return label + }() + + + private let iphoneImage: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(systemName: "iphone") + imageView.tintColor = .lightGray + imageView.contentMode = .scaleAspectFit + return imageView + }() + + + private let iphoneLabel: UILabel = { + let label = UILabel() + label.text = "iPhone" + label.font = UIFont.boldSystemFont(ofSize: 13) + label.textColor = .lightGray + return label + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + setupUI() + } + private func setupUI() { + + view.addSubview(titleLabel) + view.addSubview(previewImageView) + view.addSubview(iphoneImage) + view.addSubview(iphoneLabel) + + + titleLabel.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(20) + make.leading.equalToSuperview().offset(20) + } + + previewImageView.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(20) + make.leading.equalTo(titleLabel.snp.leading) + make.trailing.equalToSuperview().offset(-20) + make.height.equalTo(550) + + } + + iphoneImage.snp.makeConstraints { make in + make.top.equalTo(previewImageView.snp.bottom).offset(10) + make.leading.equalTo(titleLabel.snp.leading) + make.width.height.equalTo(20) + } + + iphoneLabel.snp.makeConstraints { make in + make.centerY.equalTo(iphoneImage.snp.centerY) + make.leading.equalTo(iphoneImage.snp.trailing).offset(5) + } + + } + +} + +#Preview { + PreviewViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatinfViews.swift b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatinfViews.swift new file mode 100644 index 0000000..0b64250 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatinfViews.swift @@ -0,0 +1,98 @@ +// +// RatinfViews.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit + +class RatingViews: UIView { + + private let ratingLabel: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 12) + label.textColor = .systemGray + return label + }() + + private let ratingMid: UILabel = { + let label = UILabel() + label.font = UIFont.boldSystemFont(ofSize: 24) + label.textColor = .systemGray + return label + }() + + private let ratingBottom: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .systemGray + return label + }() + + private let verticalSeparator: UIView = { + let view = UIView() + view.backgroundColor = .systemGray + return view + }() + + private let ratingStack: UIStackView = { + let stackView = UIStackView() + stackView.axis = .vertical + stackView.alignment = .center + stackView.spacing = 5 + return stackView + }() + + private let mainStack: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.alignment = .center + stackView.spacing = 10 + return stackView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + setupUI() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + setupUI() + } + + private func setupUI() { + ratingStack.addArrangedSubview(ratingLabel) + ratingStack.addArrangedSubview(ratingMid) + ratingStack.addArrangedSubview(ratingBottom) + + mainStack.addArrangedSubview(verticalSeparator) + mainStack.addArrangedSubview(ratingStack) + mainStack.addArrangedSubview(verticalSeparator) + + addSubview(mainStack) + + mainStack.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + verticalSeparator.snp.makeConstraints { make in + make.width.equalTo(1) + make.height.equalTo(30) + } + } + + func configure(ratingText: String, ratingValue: String, starText: String) { + ratingLabel.text = ratingText + ratingMid.text = ratingValue + ratingBottom.text = starText + } +} + +#Preview { + let ratingView = RatingViews() + ratingView.configure(ratingText: "8.4๋งŒ๊ฐœ์˜ ํ‰๊ฐ€", ratingValue: "4.4", starText: "โ˜…โ˜…โ˜…โ˜…โ˜…") + return ratingView +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingScrollView.swift b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingScrollView.swift new file mode 100644 index 0000000..7e5e864 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingScrollView.swift @@ -0,0 +1,109 @@ +// +// RatingScrollView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit + +class RatingScrollView: UIScrollView { + + private let stackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.alignment = .fill + stackView.spacing = 10 + return stackView + }() + + + + private let separatorTopLine: UIView = { + let view = UIView() + view.backgroundColor = .systemGray + return view + }() + + + private let separatorBtmLine: UIView = { + let view = UIView() + view.backgroundColor = .systemGray + return view + }() + + + override init(frame: CGRect) { + super.init(frame: frame) + addRatingViews() + + setupScrollView() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + addRatingViews() + + setupScrollView() + } + + + + private func setupScrollView() { + addSubview(stackView) + addSubview(separatorTopLine) + addSubview(separatorBtmLine) + + separatorTopLine.snp.makeConstraints { make in + make.bottom.equalTo(stackView.snp.top).offset(-10) + make.horizontalEdges.equalToSuperview() + make.height.equalTo(5) + } + + separatorBtmLine.snp.makeConstraints { make in + make.top.equalTo(stackView.snp.bottom).offset(10) + make.horizontalEdges.equalToSuperview() + make.height.equalTo(5) + } + + stackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.height.equalToSuperview() + } + + + contentSize = CGSize(width: stackView.frame.width, height: frame.height) + showsHorizontalScrollIndicator = false + } + + + private func addRatingViews() { + let ratingData = [ + ("1.2๋งŒ๊ฐœ์˜ ํ‰๊ฐ€", "4.2", "โ˜…โ˜…โ˜…โ˜…โ˜†"), + ("์ˆ˜์ƒ", "โญ", "์•ฑ"), + ("์—ฐ๋ น", "+4", "์„ธ"), + ("๊ธˆ์œต", "#6", "์ฐจํŠธ"), + ("Sopt", "iOS", "์•ˆ์žฌํ˜„") + ] + + for data in ratingData { + let ratingView = RatingViews() + ratingView.configure(ratingText: data.0, ratingValue: data.1, starText: data.2) + stackView.addArrangedSubview(ratingView) + + ratingView.snp.makeConstraints { make in + make.width.equalTo(80) + make.height.equalToSuperview() + + } + } + + + + + + } +} + + diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingViewController.swift new file mode 100644 index 0000000..d8b08af --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/RatingViewController/RatingViewController.swift @@ -0,0 +1,37 @@ +// +// RatingViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + + +import UIKit +import SnapKit + +class RatingViewController: UIViewController { + + private let scrollView = RatingScrollView() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + private func setupUI() { + view.backgroundColor = .black + + view.addSubview(scrollView) + + scrollView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide) + make.leading.trailing.equalToSuperview() + make.height.equalTo(200) + + } + } +} + +#Preview { + RatingViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/ReviewBottomViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewBottomViewController.swift new file mode 100644 index 0000000..778ca43 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewBottomViewController.swift @@ -0,0 +1,127 @@ +// +// ReviewViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// +import Foundation +import UIKit +import SnapKit + +class ReviewBottomViewController: UIViewController { + + + private let rateLabel: UILabel = { + let label = UILabel() + label.text = "ํƒญํ•˜์—ฌ ํ‰๊ฐ€ํ•˜๊ธฐ" + label.font = UIFont.boldSystemFont(ofSize: 16) + label.textColor = .white + return label + }() + + + private let starStackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 8 + stackView.alignment = .center + + for _ in 1...5 { + let starImageView = UIImageView(image: UIImage(systemName: "star")) + starImageView.tintColor = .systemBlue + starImageView.snp.makeConstraints { make in + make.width.height.equalTo(30) + } + stackView.addArrangedSubview(starImageView) + } + + return stackView + }() + + + private let writeReviewButton: UIButton = { + let button = UIButton(type: .system) + + var config = UIButton.Configuration.plain() + config.title = "๋ฆฌ๋ทฐ ์ž‘์„ฑ" + config.image = UIImage(systemName: "square.and.pencil") + + let largeConfig = UIImage.SymbolConfiguration(pointSize: 10) + config.preferredSymbolConfigurationForImage = largeConfig + + config.baseForegroundColor = .systemBlue + config.imagePadding = 8 + config.background.backgroundColor = UIColor(red: 28/255, green: 28/255, blue: 30/255, alpha: 1.0) + config.background.cornerRadius = 15 + + button.configuration = config + + return button + }() + + + private let supportButton: UIButton = { + let button = UIButton(type: .system) + + var config = UIButton.Configuration.plain() + config.title = "์•ฑ ์ง€์›" + config.image = UIImage(systemName: "questionmark.circle") + + let largeConfig = UIImage.SymbolConfiguration(pointSize: 10) + config.preferredSymbolConfigurationForImage = largeConfig + + config.baseForegroundColor = .systemBlue + config.imagePadding = 8 + config.background.backgroundColor = UIColor(red: 28/255, green: 28/255, blue: 30/255, alpha: 1.0) + config.background.cornerRadius = 15 + + button.configuration = config + + return button + }() + + + private let buttonStackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 20 + stackView.distribution = .fillEqually + return stackView + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + setupUI() + } + + private func setupUI() { + view.addSubview(rateLabel) + view.addSubview(starStackView) + view.addSubview(buttonStackView) + + buttonStackView.addArrangedSubview(writeReviewButton) + buttonStackView.addArrangedSubview(supportButton) + + rateLabel.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(20) + make.centerX.equalToSuperview() + } + + starStackView.snp.makeConstraints { make in + make.top.equalTo(rateLabel.snp.bottom).offset(10) + make.centerX.equalToSuperview() + } + + buttonStackView.snp.makeConstraints { make in + make.top.equalTo(starStackView.snp.bottom).offset(20) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.height.equalTo(50) + } + } +} + +#Preview { + ReviewBottomViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidScrollView.swift b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidScrollView.swift new file mode 100644 index 0000000..b178a2f --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidScrollView.swift @@ -0,0 +1,75 @@ +//// +//// Reviw.swift +//// Sopt_Appstore +//// +//// Created by Jaehyun Ahn on 10/31/24. +//// +// + +import UIKit +import SnapKit + +class ReviewMidScrollView: UIScrollView { + + private let stackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 10 + stackView.alignment = .fill + stackView.distribution = .fillEqually + + + + return stackView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + setupScrollView() + addReviewViews() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + setupScrollView() + addReviewViews() + } + + private func setupScrollView() { + addSubview(stackView) + stackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.height.equalToSuperview() + } + showsHorizontalScrollIndicator = false + } + + private func addReviewViews() { + for i in 1...5 { + let reviewView = ReviewMidView() + reviewView.configure( + with: "๋ฆฌ๋ทฐ ์ œ๋ชฉ \(i)", + reviewDate: "9์›” \(20 + i)์ผ", + reviewContent: "๋ฆฌ๋ทฐ ๋‚ด์šฉ \(i)์ž…๋‹ˆ๋‹ค. ์—…๋ฐ์ดํŠธ์— ๋Œ€ํ•œ ์˜๊ฒฌ์„ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.", + developerResponseTitle: "๊ฐœ๋ฐœ์ž ๋‹ต๋ณ€", + responseDate: "9์›” \(22 + i)์ผ", + developerResponseContent: "์•ˆ๋…•ํ•˜์„ธ์š”. \(i)๋ฒˆ ๋‹ต๋ณ€์ž…๋‹ˆ๋‹ค." + ) + + reviewView.layer.cornerRadius = 20 + reviewView.layer.masksToBounds = true + + + stackView.addArrangedSubview(reviewView) + reviewView.snp.makeConstraints { make in + make.width.equalTo(380) + make.height.equalTo(240) + } + } + } +} + + +#Preview{ + ReviewMidScrollView() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidView.swift b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidView.swift new file mode 100644 index 0000000..baacb03 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidView.swift @@ -0,0 +1,157 @@ +// +// FooterViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// +import UIKit +import SnapKit + +protocol ReviewContentConfigurable { + func configure(with reviewTitle: String, reviewDate: String, reviewContent: String, developerResponseTitle: String, responseDate: String, developerResponseContent: String) +} + +class ReviewMidView: UIView, ReviewContentConfigurable { + + private let reviewTitleLabel: UILabel = { + let label = UILabel() + label.font = UIFont.boldSystemFont(ofSize: 16) + label.textColor = .white + return label + }() + + private let starStackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 2 + stackView.alignment = .center + stackView.layer.cornerRadius = 20 + for _ in 1...5 { + let starImageView = UIImageView(image: UIImage(systemName: "star.fill")) + starImageView.tintColor = .white + starImageView.snp.makeConstraints { make in + make.width.height.equalTo(13) + } + stackView.addArrangedSubview(starImageView) + } + return stackView + }() + + private let reviewDateLabel: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + return label + }() + + private let reviewContentLabel: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .white + label.numberOfLines = 0 + return label + }() + + private let developerResponseTitleLabel: UILabel = { + let label = UILabel() + label.font = UIFont.boldSystemFont(ofSize: 15) + label.textColor = .white + return label + }() + + private let responseDateLabel: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + return label + }() + + private let developerResponseContentLabel: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + label.numberOfLines = 0 + return label + }() + + override init(frame: CGRect) { + super.init(frame: frame) + setupUI() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + setupUI() + } + + func configure(with reviewTitle: String, reviewDate: String, reviewContent: String, developerResponseTitle: String, responseDate: String, developerResponseContent: String) { + reviewTitleLabel.text = reviewTitle + reviewDateLabel.text = reviewDate + reviewContentLabel.text = reviewContent + developerResponseTitleLabel.text = developerResponseTitle + responseDateLabel.text = responseDate + developerResponseContentLabel.text = developerResponseContent + } + + private func setupUI() { + backgroundColor = UIColor(red: 28/255, green: 28/255, blue: 30/255, alpha: 1.0) + + addSubview(reviewTitleLabel) + addSubview(starStackView) + addSubview(reviewDateLabel) + addSubview(reviewContentLabel) + addSubview(developerResponseTitleLabel) + addSubview(responseDateLabel) + addSubview(developerResponseContentLabel) + + reviewTitleLabel.snp.makeConstraints { make in + make.top.equalToSuperview().offset(20) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + } + + starStackView.snp.makeConstraints { make in + make.top.equalTo(reviewTitleLabel.snp.bottom).offset(10) + make.leading.equalTo(reviewTitleLabel) + } + + reviewDateLabel.snp.makeConstraints { make in + make.leading.equalTo(starStackView.snp.trailing).offset(10) + make.centerY.equalTo(starStackView) + } + + reviewContentLabel.snp.makeConstraints { make in + make.top.equalTo(starStackView.snp.bottom).offset(10) + make.leading.equalTo(reviewTitleLabel) + make.trailing.equalToSuperview().offset(-20) + } + + developerResponseTitleLabel.snp.makeConstraints { make in + make.top.equalTo(reviewContentLabel.snp.bottom).offset(20) + make.leading.equalTo(reviewTitleLabel) + } + + responseDateLabel.snp.makeConstraints { make in + make.leading.equalTo(developerResponseTitleLabel.snp.trailing).offset(10) + make.centerY.equalTo(developerResponseTitleLabel) + } + + developerResponseContentLabel.snp.makeConstraints { make in + make.top.equalTo(developerResponseTitleLabel.snp.bottom).offset(10) + make.leading.equalTo(reviewTitleLabel) + make.trailing.equalToSuperview().offset(-20) + } + } +} + #Preview { + let reviewView = ReviewMidView() + reviewView.configure( + with: "๋ฆฌ๋ทฐ ์ œ๋ชฉ ์˜ˆ์‹œ", + reviewDate: "10์›” 31์ผ", + reviewContent: "ํ† ์Šค ์•ฑ ์—…๋ฐ์ดํŠธ ์ดํ›„ UI๊ฐ€ ์˜ˆ์ „๋งŒํผ ์ง๊ด€์ ์ด์ง€ ์•Š๋‹ค๊ณ  ๋А๋‚๋‹ˆ๋‹ค. ์˜ˆ์ „์˜ ์ƒ‰๊น”์ด ์‚ฌ๋ผ์ง„ ๊ฒƒ ๊ฐ™์•„ ์•„์‰ฝ๋„ค์š”.", + developerResponseTitle: "๊ฐœ๋ฐœ์ž ๋‹ต๋ณ€", + responseDate: "11์›” 1์ผ", + developerResponseContent: "์•ˆ๋…•ํ•˜์„ธ์š”, ํ† ์Šค ํŒ€์ž…๋‹ˆ๋‹ค. ์†Œ์ค‘ํ•œ ํ”ผ๋“œ๋ฐฑ์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๊ฐœ์„ ํ•˜๊ธฐ ์œ„ํ•ด ๊พธ์ค€ํžˆ ๋…ธ๋ ฅํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค." + ) + return reviewView + } diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidViewController.swift new file mode 100644 index 0000000..e711984 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewMidViewController/ReviewMidViewController.swift @@ -0,0 +1,33 @@ +// +// ReviewMidViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit + +class ReviewMidViewController: UIViewController { + + private let scrollView = ReviewMidScrollView() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + private func setupUI() { + view.backgroundColor = .black + + view.addSubview(scrollView) + + scrollView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide) + } + } +} + +#Preview { + ReviewMidViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/ReviewTopViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewTopViewController.swift new file mode 100644 index 0000000..47275bd --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/ReviewTopViewController.swift @@ -0,0 +1,143 @@ +// +// FeatureViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// +import Foundation +import UIKit +import SnapKit + +class ReviewTopViewController: UIViewController { + + + private let reviewTitleLabel: UILabel = { + let label = UILabel() + label.text = "ํ‰๊ฐ€ ๋ฐ ๋ฆฌ๋ทฐ" + label.font = UIFont.boldSystemFont(ofSize: 18) + label.textColor = .white + return label + }() + + + private let ratingLabel: UILabel = { + let label = UILabel() + label.text = "4.4" + label.font = UIFont.boldSystemFont(ofSize: 60) + label.textColor = .white + return label + }() + + + private let helpfulReviewLabel: UILabel = { + let label = UILabel() + label.text = "๊ฐ€์žฅ ๋„์›€์ด ๋˜๋Š” ๋ฆฌ๋ทฐ" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .white + return label + }() + + + private let starStackView: UIStackView = { + let starFilled = UIImage(systemName: "star.fill") + let starHalf = UIImage(systemName: "star.leadinghalf.filled") + + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 2 + + for _ in 1...4 { + let starImageView = UIImageView(image: starFilled) + starImageView.tintColor = .white + starImageView.snp.makeConstraints { make in + make.width.height.equalTo(20) + } + stackView.addArrangedSubview(starImageView) + } + + let halfStarImageView = UIImageView(image: starHalf) + halfStarImageView.tintColor = .white + halfStarImageView.snp.makeConstraints { make in + make.width.height.equalTo(20) + } + stackView.addArrangedSubview(halfStarImageView) + + return stackView + }() + + private let reviewCountLabel: UILabel = { + let label = UILabel() + label.text = "8.4๋งŒ๊ฐœ์˜ ํ‰๊ฐ€" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .lightGray + return label + }() + + + private let arrowButton: UIButton = { + let button = UIButton(type: .system) + let arrowImage = UIImage(systemName: "chevron.right") + button.setImage(arrowImage, for: .normal) + button.tintColor = .gray + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + setupUI() + } + + private func setupUI() { + view.addSubview(reviewTitleLabel) + view.addSubview(ratingLabel) + view.addSubview(helpfulReviewLabel) + view.addSubview(starStackView) + view.addSubview(reviewCountLabel) + view.addSubview(arrowButton) + + reviewTitleLabel.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(20) + make.leading.equalToSuperview().offset(20) + } + + arrowButton.snp.makeConstraints { make in + make.centerY.equalTo(reviewTitleLabel) + make.leading.equalTo(reviewTitleLabel.snp.trailing).offset(8) + make.width.height.equalTo(20) + } + + ratingLabel.snp.makeConstraints { make in + make.top.equalTo(reviewTitleLabel.snp.bottom).offset(15) + make.leading.equalTo(reviewTitleLabel) + } + + helpfulReviewLabel.snp.makeConstraints { make in + make.top.equalTo(ratingLabel.snp.bottom).offset(15) + make.leading.equalTo(ratingLabel) + } + + starStackView.snp.makeConstraints { make in + make.bottom.equalTo(reviewCountLabel.snp.top).offset(-10) + make.trailing.equalToSuperview().offset(-20) + } + + reviewCountLabel.snp.makeConstraints { make in + make.bottom.equalTo(ratingLabel) + make.trailing.equalToSuperview().offset(-20) + + + arrowButton.addTarget(self, action: #selector(arrowButtonTapped), for: .touchUpInside) + + } + + } + @objc func arrowButtonTapped() { + let reviewPage = ReviewPageViewController() + navigationController?.pushViewController(reviewPage, animated: true) + } +} + +#Preview { + ReviewTopViewController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/TapbarView.swift b/Sopt_Appstore/VIew/AppStoreViewModules/TapbarView.swift new file mode 100644 index 0000000..3c6bf90 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/TapbarView.swift @@ -0,0 +1,80 @@ +// +// TapbarView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/25/24. +// + +import Foundation +import UIKit +import SnapKit + +class MainTabBarController: UITabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + + // ๊ฐ ํƒญ๋ณ„ ๋„ค๋น„๊ฒŒ์ด์…˜ ์ปจํŠธ๋กค๋Ÿฌ ์„ค์ • + let todayVC = createNavController(viewController: HeaderViewController1(), title: "ํˆฌ๋ฐ์ด", image: UIImage(systemName: "house.fill")!) + let gameVC = createNavController(viewController: RatingViewController1(), title: "๊ฒŒ์ž„", image: UIImage(systemName: "gamecontroller.fill")!) + let appVC = createNavController(viewController: UIViewController(), title: "์•ฑ", image: UIImage(systemName: "app.fill")!) + let arcadeVC = createNavController(viewController: UIViewController(), title: "์•„์ผ€์ด๋“œ", image: UIImage(systemName: "cube.box.fill")!) + let searchVC = createNavController(viewController: UIViewController(), title: "๊ฒ€์ƒ‰", image: UIImage(systemName: "magnifyingglass")!) + + // ํƒญ๋ฐ”์— ์ถ”๊ฐ€ + viewControllers = [todayVC, gameVC, appVC, arcadeVC, searchVC] + + // ํƒญ๋ฐ” ๋ฐฐ๊ฒฝ์ƒ‰ ๋ฐ ํƒญ ์•„์ดํ…œ ์ƒ‰์ƒ ์„ค์ • + tabBar.barTintColor = .white + tabBar.tintColor = .systemBlue + } + + // ๋„ค๋น„๊ฒŒ์ด์…˜ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ํ•จ์ˆ˜ + func createNavController(viewController: UIViewController, title: String, image: UIImage) -> UINavigationController { + viewController.navigationItem.title = title + let navController = UINavigationController(rootViewController: viewController) + navController.tabBarItem.title = title + navController.tabBarItem.image = image + return navController + } +} + +// ์˜ˆ์‹œ์šฉ ํ—ค๋” ๋ฐ ๋“ฑ๊ธ‰ ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ +class HeaderViewController1: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + + let label = UILabel() + label.text = "ํˆฌ๋ฐ์ด ํ™”๋ฉด" + label.textAlignment = .center + label.font = UIFont.systemFont(ofSize: 24) + view.addSubview(label) + + label.snp.makeConstraints { make in + make.center.equalToSuperview() + } + } +} + +class RatingViewController1: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + + let label = UILabel() + label.text = "๊ฒŒ์ž„ ํ™”๋ฉด" + label.textAlignment = .center + label.font = UIFont.systemFont(ofSize: 24) + view.addSubview(label) + + label.snp.makeConstraints { make in + make.center.equalToSuperview() + } + } +} + +// Preview ์ง€์› +#Preview { + MainTabBarController() +} diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/TossView.swift b/Sopt_Appstore/VIew/AppStoreViewModules/TossView.swift new file mode 100644 index 0000000..84418dc --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/TossView.swift @@ -0,0 +1,272 @@ +// +// ViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + + +import UIKit +import SnapKit + +class TossViewController: UIViewController, UIScrollViewDelegate { + + + + ///feedback + // ๋ณต์žกํ•œ ๊ธฐ๋Šฅ์ด์—†๋‹ค๋ฉด VC -> View๋กœ ๋ฐ”๊พธ์„ธ์š”. + let headerViewController = HeaderViewController() + let ratingViewController = RatingViewController() + let updateInfoViewController = UpdateInfoViewController() + let previewViewController = PreviewViewController() + let infoViewController = InfoViewController() + let reviewTopViewController = ReviewTopViewController() + let reviewMidViewController = ReviewMidViewController() + let reviewBottomViewController = ReviewBottomViewController() + + + + + + let scrollView = UIScrollView() + let contentView = UIView() + + let myTabBarController = UITabBarController() + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = .black + + setupNavigationBar() + + setupTabBarController() + + setupScrollView() + } + + + + // MARK: - ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” ์„ค์ • + func setupNavigationBar() { + let backButtonView = UIView() + let backImageView = UIImageView(image: UIImage(systemName: "chevron.left")) + let backLabel = UILabel() + + backImageView.tintColor = .systemBlue + backImageView.contentMode = .scaleAspectFit + + backLabel.text = "๊ฒ€์ƒ‰" + backLabel.textColor = .systemBlue + backLabel.font = UIFont.systemFont(ofSize: 17) + + let stackView = UIStackView(arrangedSubviews: [backImageView, backLabel]) + stackView.axis = .horizontal + stackView.spacing = 5 + stackView.alignment = .center + + backButtonView.addSubview(stackView) + stackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + let backButton = UIBarButtonItem(customView: backButtonView) + navigationItem.leftBarButtonItem = backButton + + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + navigationController?.navigationBar.standardAppearance = appearance + navigationController?.navigationBar.scrollEdgeAppearance = appearance + } + + + + + // MARK: - ํƒญ๋ฐ” ์„ค์ • + func setupTabBarController() { + scrollView.delegate = self // ์Šคํฌ๋กค ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ? + + + let todayVC = UIViewController() + let gameVC = UIViewController() + let appVC = UIViewController() + let arcadeVC = UIViewController() + let searchVC = UIViewController() + + todayVC.tabBarItem = UITabBarItem(title: "ํˆฌ๋ฐ์ด", image: UIImage(systemName: "house.fill"), tag: 0) + gameVC.tabBarItem = UITabBarItem(title: "๊ฒŒ์ž„", image: UIImage(systemName: "gamecontroller.fill"), tag: 1) + appVC.tabBarItem = UITabBarItem(title: "์•ฑ", image: UIImage(systemName: "app.fill"), tag: 2) + arcadeVC.tabBarItem = UITabBarItem(title: "์•„์ผ€์ด๋“œ", image: UIImage(systemName: "cube.box.fill"), tag: 3) + searchVC.tabBarItem = UITabBarItem(title: "๊ฒ€์ƒ‰", image: UIImage(systemName: "magnifyingglass"), tag: 4) + + + myTabBarController.viewControllers = [todayVC, gameVC, appVC, arcadeVC, searchVC] + + let appearance = UITabBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = UIColor(red: 25/255, green: 25/255, blue: 25/255, alpha: 1) + + myTabBarController.tabBar.standardAppearance = appearance + if #available(iOS 15.0, *) { + myTabBarController.tabBar.scrollEdgeAppearance = appearance + } + + myTabBarController.tabBar.tintColor = .white + myTabBarController.tabBar.unselectedItemTintColor = .lightGray + + addChild(myTabBarController) + view.addSubview(myTabBarController.view) + myTabBarController.didMove(toParent: self) + + myTabBarController.view.snp.makeConstraints { make in + make.leading.trailing.bottom.equalTo(view) + make.height.equalTo(50) + make.bottom.equalTo(myTabBarController.tabBar.snp.top) + } + myTabBarController.additionalSafeAreaInsets.bottom = 0 + + } + + + + + + // MARK: - ScrollView ์„ค์ • + func setupScrollView() { + + view.addSubview(scrollView) + scrollView.addSubview(contentView) + + scrollView.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide) + make.leading.trailing.equalToSuperview() + make.bottom.equalTo(myTabBarController.tabBar.snp.top) + } + + contentView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.width.equalToSuperview() + make.height.equalTo(1860) + } + + addChild(headerViewController) + + contentView.addSubview(headerViewController.view) + headerViewController.didMove(toParent: self) + + headerViewController.view.snp.makeConstraints { make in + make.edges.equalToSuperview() + + make.height.equalTo(contentView.snp.width).multipliedBy(0.3) + } + + + addChild(ratingViewController) + contentView.addSubview(ratingViewController.view) + ratingViewController.didMove(toParent: self) + + ratingViewController.view.snp.makeConstraints { make in + make.top.equalTo(headerViewController.view.snp.bottom).offset(20) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(contentView.snp.width).multipliedBy(0.3) + } + + addChild(updateInfoViewController) + contentView.addSubview(updateInfoViewController.view) + updateInfoViewController.didMove(toParent: self) + + updateInfoViewController.view.snp.makeConstraints { make in + make.top.equalTo(ratingViewController.view.snp.bottom) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(contentView.snp.width).multipliedBy(0.3) + } + + addChild(previewViewController) + contentView.addSubview(previewViewController.view) + previewViewController.didMove(toParent: self) + + previewViewController.view.snp.makeConstraints { make in + make.top.equalTo(updateInfoViewController.view.snp.bottom).offset(20) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(660) + } + + addChild(infoViewController) + contentView.addSubview(infoViewController.view) + infoViewController.didMove(toParent: self) + + infoViewController.view.snp.makeConstraints { make in + make.top.equalTo(previewViewController.view.snp.bottom).offset(20) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(contentView.snp.width).multipliedBy(0.35) + } + + addChild(reviewTopViewController) + contentView.addSubview(reviewTopViewController.view) + reviewTopViewController.didMove(toParent: self) + + reviewTopViewController.view.snp.makeConstraints { make in + make.top.equalTo(infoViewController.view.snp.bottom).offset(20) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(contentView.snp.width).multipliedBy(0.4) + } + + + addChild(reviewMidViewController) + contentView.addSubview(reviewMidViewController.view) + + reviewMidViewController.view.snp.makeConstraints { make in + make.top.equalTo(reviewTopViewController.view.snp.bottom).offset(20) + make.leading.equalTo(contentView).offset(20) + make.trailing.equalTo(contentView).offset(-20) + make.height.equalTo(contentView.snp.width).multipliedBy(0.6) + + } + reviewMidViewController.didMove(toParent: self) + reviewMidViewController.view.layer.cornerRadius = 20 + reviewMidViewController.view.clipsToBounds = true + + + addChild(reviewBottomViewController) + contentView.addSubview(reviewBottomViewController.view) + reviewBottomViewController.didMove(toParent: self) + + reviewBottomViewController.view.snp.makeConstraints { make in + make.top.equalTo(reviewMidViewController.view.snp.bottom).offset(20) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(150) + } + + + } + + // MARK: - ์Šคํฌ๋กค ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ + @objc func scrollViewDidScroll(_ scrollView: UIScrollView) { + let offset = scrollView.contentOffset.y + + + + ///feedback + // 2๋ฒˆ ์ค‘๋ณต๋˜๋Š” ์ฝ”๋“œ๋Š” ํ•จ์ˆ˜ํ™” ๊ฐ€๋Šฅํ•˜๋ฉด ํ•˜์ž! + if offset > 100 { + let appearance = UINavigationBarAppearance() + appearance.configureWithDefaultBackground() + appearance.backgroundColor = UIColor(red: 25/255, green: 25/255, blue: 25/255, alpha: 1) + + navigationController?.navigationBar.standardAppearance = appearance + navigationController?.navigationBar.scrollEdgeAppearance = appearance + } else { + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + navigationController?.navigationBar.standardAppearance = appearance + navigationController?.navigationBar.scrollEdgeAppearance = appearance + } + } +} + +#Preview { + let navController = UINavigationController(rootViewController: TossViewController()) + return navController +} + + diff --git a/Sopt_Appstore/VIew/AppStoreViewModules/UpdateInfoViewController.swift b/Sopt_Appstore/VIew/AppStoreViewModules/UpdateInfoViewController.swift new file mode 100644 index 0000000..52b2070 --- /dev/null +++ b/Sopt_Appstore/VIew/AppStoreViewModules/UpdateInfoViewController.swift @@ -0,0 +1,106 @@ +// +// UpdateInfoViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/24/24. +// + + +import UIKit +import SnapKit + +class UpdateInfoViewController: UIViewController { + + private let titleLabel: UILabel = { + let label = UILabel() + label.text = "์ƒˆ๋กœ์šด ์†Œ์‹" + label.font = UIFont.boldSystemFont(ofSize: 22) + label.textColor = .white + return label + }() + + private let versionLabel: UILabel = { + let label = UILabel() + label.text = "๋ฒ„์ „ 5.185.0" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .gray + return label + }() + + private let arrowButton: UIButton = { + let button = UIButton(type: .system) + let arrowImage = UIImage(systemName: "chevron.right") + button.setImage(arrowImage, for: .normal) + button.tintColor = .gray + return button + }() + + private let updateDescriptionLabel: UILabel = { + let label = UILabel() + label.text = "โ€ข ๊ตฌ์„๊ตฌ์„ ์ˆจ์–ด์žˆ๋˜ ๋ฒ„๊ทธ๋“ค์„ ์žก์•˜์–ด์š”. ๋˜ ๋‹ค๋ฅธ ๋ฒ„๊ทธ๊ฐ€ ๋‚˜ํƒ€๋‚˜๋ฉด ํ† ์Šค ๊ณ ๊ฐ์„ผํ„ฐ๋ฅผ ์ฐพ์•„์ฃผ์„ธ์š”. ๋Š˜ ์—ด๋ ค์žˆ๋‹ต๋‹ˆ๋‹ค. 365์ผ 24์‹œ๊ฐ„ ์–ธ์ œ๋“ ์ง€์š”." + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .white + label.numberOfLines = 0 + return label + }() + + private let timeAgoLabel: UILabel = { + let label = UILabel() + label.text = "6์ผ ์ „" + label.font = UIFont.systemFont(ofSize: 14) + label.textColor = .gray + return label + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + setupUI() + } + + private func setupUI() { + view.addSubview(titleLabel) + view.addSubview(versionLabel) + view.addSubview(updateDescriptionLabel) + view.addSubview(timeAgoLabel) + view.addSubview(arrowButton) + + titleLabel.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide) + make.leading.equalToSuperview().offset(20) + } + + arrowButton.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.top).offset(2) + make.leading.equalTo(titleLabel.snp.trailing).offset(2) + make.width.height.equalTo(20) + } + + versionLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(5) + make.leading.equalTo(titleLabel) + } + + updateDescriptionLabel.snp.makeConstraints { make in + make.top.equalTo(versionLabel.snp.bottom).offset(10) + make.leading.equalTo(titleLabel) + make.trailing.equalToSuperview().offset(-20) + } + + timeAgoLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(5) + make.trailing.equalToSuperview().offset(-20) + } + + arrowButton.addTarget(self, action: #selector(arrowButtonTapped), for: .touchUpInside) + } + + @objc func arrowButtonTapped() { + let versionPage = VersionPageViewController() + navigationController?.pushViewController(versionPage, animated: true) + } +} + +#Preview { + UpdateInfoViewController() +} diff --git a/Sopt_Appstore/VIew/Extension/ComponentExtension.swift b/Sopt_Appstore/VIew/Extension/ComponentExtension.swift new file mode 100644 index 0000000..a1ca5d5 --- /dev/null +++ b/Sopt_Appstore/VIew/Extension/ComponentExtension.swift @@ -0,0 +1,47 @@ +// +// ComponentExtension.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/30/24. +// + + +import UIKit + + +extension UIButton { + static func makeActionButton(with title: String) -> UIButton { + var config = UIButton.Configuration.filled() + + config.baseBackgroundColor = .systemGray6 + config.cornerStyle = .capsule + config.attributedTitle = AttributedString("\(title)", attributes: AttributeContainer([ + .font: UIFont.systemFont(ofSize: 12, weight: .bold) + ])) + config.contentInsets = NSDirectionalEdgeInsets(top: 5, leading: 10, bottom: 5, trailing: 10) + config.baseForegroundColor = .systemBlue + + let button = UIButton(configuration: config, primaryAction: nil) + button.snp.makeConstraints { $0.width.greaterThanOrEqualTo(60) } + return button + } +} +extension UILabel { + static func makePurchaseLabel(with text: String) -> UILabel { + let label = UILabel() + label.text = text + label.font = UIFont.systemFont(ofSize: 10) + label.textColor = UIColor(white: 1.0, alpha: 0.7) + label.textAlignment = .center + return label + } +} +extension UIViewController { + func showAlert(title: String = "์•Œ๋ฆผ", message: String, completion: (() -> Void)? = nil) { + let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "ํ™•์ธ", style: .default, handler: { _ in + completion?() + })) + present(alert, animated: true, completion: nil) + } +} diff --git a/Sopt_Appstore/VIew/FinanceView/AppChartView/AppDataSet.swift b/Sopt_Appstore/VIew/FinanceView/AppChartView/AppDataSet.swift new file mode 100644 index 0000000..9e041b5 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppChartView/AppDataSet.swift @@ -0,0 +1,57 @@ +// +// AppDataSet.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + + +import UIKit + + +struct App: Identifiable, Hashable { + let id = UUID() + let iconImage: UIImage + let title: String + let downloadState: DownloadState + let subTitle: String + let category: String + let ranking: Int +} + +extension App { + static let mockData: [App] = [ + App(iconImage: UIImage(named: "Toss_App_Icon")!, title: "ํ† ์Šค", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "browsing", ranking: 1), + App(iconImage: UIImage(named: "2")!, title: "Books", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "education", ranking: 2), + App(iconImage: UIImage(named: "3")!, title: "Clock", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 3), + App(iconImage: UIImage(named: "4")!, title: "App Store", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "shopping", ranking: 4), + App(iconImage: UIImage(named: "5")!, title: "iTunes", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "music", ranking: 5), + App(iconImage: UIImage(named: "6")!, title: "Contacts", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 6), + App(iconImage: UIImage(named: "7")!, title: "Podcasts", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "entertainment", ranking: 7), + App(iconImage: UIImage(named: "8")!, title: "Calculator", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 8), + App(iconImage: UIImage(named: "9")!, title: "Camera", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "photo & video", ranking: 9), + App(iconImage: UIImage(named: "10")!, title: "Compass", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 10), + App(iconImage: UIImage(named: "11")!, title: "Mail", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "productivity", ranking: 11), + App(iconImage: UIImage(named: "12")!, title: "Voice Memos", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 12), + App(iconImage: UIImage(named: "13")!, title: "Apple TV", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "entertainment", ranking: 13), + App(iconImage: UIImage(named: "14")!, title: "Settings", downloadState: .installed, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "utilities", ranking: 14), + App(iconImage: UIImage(named: "15")!, title: "Tips", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "education", ranking: 15), + App(iconImage: UIImage(named: "16")!, title: "News", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "news", ranking: 16), + App(iconImage: UIImage(named: "17")!, title: "Phone", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "communication", ranking: 17), + App(iconImage: UIImage(named: "18")!, title: "Safari", downloadState: .dawnload, subTitle: "์•ฑ๋‚ด ๊ตฌ์ž…", category: "browsing", ranking: 18), + App(iconImage: UIImage(named: "tictokIcon")!, title: "ๆŠ–้Ÿณ", downloadState: .dawnload, subTitle: "ๅ…ฅๆ‰‹", category: "browsing", ranking: 19), + App(iconImage: UIImage(named: "1")!, title: "Home", downloadState: .dawnload, subTitle: "๋‹ค์šด", category: "utilities", ranking: 20), + + ] +} + + +enum DownloadState: String{ + + case installed = "์„ค์น˜" + case dawnload = "๊ตฌ๋งค" + case redownload = "์žฌ๊ตฌ๋งค" + case update = "์—…๋ฐ์ดํŠธ" + +} + diff --git a/Sopt_Appstore/VIew/FinanceView/AppChartView/AppRowView.swift b/Sopt_Appstore/VIew/FinanceView/AppChartView/AppRowView.swift new file mode 100644 index 0000000..e9f08c1 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppChartView/AppRowView.swift @@ -0,0 +1,126 @@ +// +// AppRowView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit +import SwiftUI +import Then + +class AppRowView: UITableViewCell { + + var onActionButtonTapped: (() -> Void)? + + static let identifier: String = "AppRowView" + + private let titleLabel = UILabel() + private let purchaseLabel = UILabel.makePurchaseLabel(with: "๊ตฌ์ž…") + private let iconImageView = UIImageView() + private let actionButton = UIButton.makeActionButton(with: "๋ฐ›๊ธฐ") + private let categoryLabel = UILabel() + private let rankingLabel = UILabel() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + setUI() + setStyle() + setLayout() + setupActions() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setStyle() { + backgroundColor = .black + titleLabel.do { + $0.numberOfLines = 2 + $0.textColor = .white + } + + iconImageView.do { + $0.layer.cornerRadius = 10 + $0.clipsToBounds = true + } + categoryLabel.do { + $0.textColor = .systemGray + } + rankingLabel.do { + $0.textColor = .white + } + purchaseLabel.do { + $0.textColor = .lightGray + } + } + + private func setUI() { + [ + iconImageView, + rankingLabel, + actionButton, + categoryLabel, + titleLabel, + purchaseLabel + ].forEach { contentView.addSubview($0) } + } + + private func setLayout() { + iconImageView.snp.makeConstraints { + $0.top.equalToSuperview().offset(10) + $0.leading.equalToSuperview().offset(20) + $0.size.equalTo(65) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + rankingLabel.snp.makeConstraints { + $0.leading.equalTo(iconImageView.snp.trailing).offset(8) + $0.top.equalTo(iconImageView.snp.top).offset(8) + } + + titleLabel.snp.makeConstraints { + $0.leading.equalTo(rankingLabel.snp.trailing).offset(8) + $0.top.equalTo(rankingLabel.snp.top) + $0.trailing.equalTo(actionButton.snp.leading).offset(-8) + } + + categoryLabel.snp.makeConstraints { + $0.leading.equalTo(titleLabel.snp.leading) + $0.top.equalTo(titleLabel.snp.bottom).offset(4) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + purchaseLabel.snp.makeConstraints { + $0.centerX.equalTo(actionButton) + $0.top.equalTo(actionButton.snp.bottom).offset(3) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + actionButton.snp.makeConstraints { + $0.top.equalTo(rankingLabel) + $0.trailing.equalToSuperview().offset(-20) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + } + + func configure(app: App) { + iconImageView.image = app.iconImage + rankingLabel.text = app.ranking.description + titleLabel.text = app.title + categoryLabel.text = app.category + purchaseLabel.text = app.subTitle + actionButton.setTitle(app.downloadState.rawValue, for: .normal) + } + + private func setupActions() { + actionButton.addTarget(self, action: #selector(actionButtonTapped), for: .touchUpInside) + } + + @objc private func actionButtonTapped() { + onActionButtonTapped?() + } +} diff --git a/Sopt_Appstore/VIew/FinanceView/AppChartView/CharListView.swift b/Sopt_Appstore/VIew/FinanceView/AppChartView/CharListView.swift new file mode 100644 index 0000000..98e100e --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppChartView/CharListView.swift @@ -0,0 +1,135 @@ +// +// CharListView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 11/1/24. +// + + +import UIKit +import SnapKit +import SwiftUI + +class ChartListView: UIViewController { + + private let chartViewController = ChartViewController() + private let myTabBarController = UITabBarController() + + override func viewDidLoad() { + super.viewDidLoad() + + edgesForExtendedLayout = .all + extendedLayoutIncludesOpaqueBars = true + + view.backgroundColor = .black + + setupNavigationBar() + setupTabBarController() + setupChartViewController() + } + + private func setupNavigationBar() { + title = "Chart" + + let appearance = UINavigationBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = .black + + navigationController?.navigationBar.standardAppearance = appearance + navigationController?.navigationBar.scrollEdgeAppearance = appearance + navigationController?.navigationBar.tintColor = .systemBlue + + let backButtonView = UIView() + let backImageView = UIImageView(image: UIImage(systemName: "chevron.left")) + let backLabel = UILabel() + + backImageView.tintColor = .systemBlue + backImageView.contentMode = .scaleAspectFit + + backLabel.text = "๊ฒ€์ƒ‰" + backLabel.textColor = .systemBlue + backLabel.font = UIFont.systemFont(ofSize: 17) + + let stackView = UIStackView(arrangedSubviews: [backImageView, backLabel]) + stackView.axis = .horizontal + stackView.spacing = 5 + stackView.alignment = .center + + backButtonView.addSubview(stackView) + stackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + let backButton = UIBarButtonItem(customView: backButtonView) + backButtonView.isUserInteractionEnabled = true + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(backButtonTapped)) + backButtonView.addGestureRecognizer(tapGesture) + navigationItem.leftBarButtonItem = backButton + } + + @objc private func backButtonTapped() { + let finacaViewController = FinanceViewController() + navigationController?.pushViewController(finacaViewController, animated: true) + } + + private func setupTabBarController() { + let todayVC = UIViewController() + let gameVC = UIViewController() + let appVC = UIViewController() + let arcadeVC = UIViewController() + let searchVC = UIViewController() + + todayVC.tabBarItem = UITabBarItem(title: "ํˆฌ๋ฐ์ด", image: UIImage(systemName: "house.fill"), tag: 0) + gameVC.tabBarItem = UITabBarItem(title: "๊ฒŒ์ž„", image: UIImage(systemName: "gamecontroller.fill"), tag: 1) + appVC.tabBarItem = UITabBarItem(title: "์•ฑ", image: UIImage(systemName: "app.fill"), tag: 2) + arcadeVC.tabBarItem = UITabBarItem(title: "์•„์ผ€์ด๋“œ", image: UIImage(systemName: "cube.box.fill"), tag: 3) + searchVC.tabBarItem = UITabBarItem(title: "๊ฒ€์ƒ‰", image: UIImage(systemName: "magnifyingglass"), tag: 4) + + myTabBarController.viewControllers = [todayVC, gameVC, appVC, arcadeVC, searchVC] + + let appearance = UITabBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = UIColor(red: 25/255, green: 25/255, blue: 25/255, alpha: 1) + + myTabBarController.tabBar.standardAppearance = appearance + if #available(iOS 15.0, *) { + myTabBarController.tabBar.scrollEdgeAppearance = appearance + } + + myTabBarController.tabBar.tintColor = .white + myTabBarController.tabBar.unselectedItemTintColor = .lightGray + + addChild(myTabBarController) + view.addSubview(myTabBarController.view) + myTabBarController.didMove(toParent: self) + + myTabBarController.view.snp.makeConstraints { make in + make.leading.trailing.bottom.equalTo(view) + make.height.equalTo(50) + } + } + + private func setupChartViewController() { + addChild(chartViewController) + view.addSubview(chartViewController.view) + chartViewController.didMove(toParent: self) + + chartViewController.view.snp.makeConstraints { make in + make.top.leading.trailing.equalTo(view) + make.bottom.equalTo(myTabBarController.tabBar.snp.top) + } + } +} + +struct ChartListViewPreview: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> UINavigationController { + let navController = UINavigationController(rootViewController: ChartListView()) + return navController + } + + func updateUIViewController(_ uiViewController: UINavigationController, context: Context) {} +} + +#Preview { + ChartListViewPreview() +} diff --git a/Sopt_Appstore/VIew/FinanceView/AppChartView/ChartViewController.swift b/Sopt_Appstore/VIew/FinanceView/AppChartView/ChartViewController.swift new file mode 100644 index 0000000..28c2be6 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppChartView/ChartViewController.swift @@ -0,0 +1,102 @@ +// +// chartViewController.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + + +import UIKit +import SwiftUI +import Then +import SnapKit + +class ChartViewController: UIViewController { + + private let tableView = UITableView() + private let appList = App.mockData + + override func viewDidLoad() { + super.viewDidLoad() + setStyle() + setUI() + } + + private func setStyle() { + + tableView.do { + $0.register( + AppRowView.self, + forCellReuseIdentifier: AppRowView.identifier + ) + $0.estimatedRowHeight = 100 + $0.rowHeight = UITableView.automaticDimension + $0.dataSource = self + $0.delegate = self + } + + } + + private func setUI() { + view.addSubview(tableView) + + tableView.snp.makeConstraints { + $0.edges.equalToSuperview() + } + + } +} + + +extension ChartViewController: UITableViewDelegate { } +extension ChartViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + //data 8๊ฐœ + return appList.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell( + withIdentifier: AppRowView.identifier, + for: indexPath + ) as? AppRowView else { return UITableViewCell() } + cell.configure(app: appList[indexPath.row]) + + + let app = appList[indexPath.row] + cell.configure(app: app) + + + cell.onActionButtonTapped = { [weak self] in + + if app.title == "ํ† ์Šค" { + self?.navigateToTossView() + } + } + + + + return cell + } + + private func navigateToTossView() { + let tossViewController = TossViewController() + navigationController?.pushViewController(tossViewController, animated: true) + } + + + + +} + +struct ChartViewControllerPreview: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> ChartViewController { + return ChartViewController() + } + + func updateUIViewController(_ uiViewController: ChartViewController, context: Context) {} +} + +#Preview { + ChartViewControllerPreview() +} diff --git a/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/AppHorizontalScrollView.swift b/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/AppHorizontalScrollView.swift new file mode 100644 index 0000000..7f71a4f --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/AppHorizontalScrollView.swift @@ -0,0 +1,76 @@ +// +// AppHorizontalScrollView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + + +import UIKit +import SnapKit +import SwiftUI +class AppHorizontalScrollView: UIViewController { + + private var collectionView: UICollectionView! + private let appData = App.mockData.prefix(9).map { $0 } + + override func viewDidLoad() { + super.viewDidLoad() + setupCollectionView() + } + + private func setupCollectionView() { + let layout = UICollectionViewFlowLayout() + layout.scrollDirection = .horizontal + layout.minimumLineSpacing = 10 + layout.itemSize = CGSize(width: view.bounds.width - 32, height: 80) + + collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) + collectionView.backgroundColor = .black + collectionView.showsVerticalScrollIndicator = false + + collectionView.dataSource = self + collectionView.delegate = self + collectionView.register(AppRowView_Collection.self, forCellWithReuseIdentifier: AppRowView_Collection.identifier) + + view.addSubview(collectionView) + collectionView.snp.makeConstraints { $0.edges.equalToSuperview() } + } + +} + + +extension AppHorizontalScrollView: UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { + + func numberOfSections(in collectionView: UICollectionView) -> Int { + return 3 + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return 3 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: AppRowView_Collection.identifier, for: indexPath) as? AppRowView_Collection else { + return UICollectionViewCell() + } + let app = appData[indexPath.section * 3 + indexPath.item] + cell.configure(app: app) + return cell + } +} + +struct HorizontalScrollViewControllerPreview: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> AppHorizontalScrollView { + return AppHorizontalScrollView() + } + + func updateUIViewController(_ uiViewController: AppHorizontalScrollView, context: Context) {} +} + +struct HorizontalScrollView_Previews: PreviewProvider { + static var previews: some View { + HorizontalScrollViewControllerPreview() + .edgesIgnoringSafeArea(.all) + } +} diff --git a/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/CollectionViewRow.swift b/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/CollectionViewRow.swift new file mode 100644 index 0000000..4c610ad --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/AppHorizontalScrollView/CollectionViewRow.swift @@ -0,0 +1,169 @@ +// +// CollectionViewRow.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit +import SwiftUI + + +class AppRowView_Collection: UICollectionViewCell { + + + var onActionButtonTapped: (() -> Void)? + static let identifier: String = "AppRowView" + + + private let titleLabel = UILabel() + private let purchaseLabel = UILabel.makePurchaseLabel(with: "๊ตฌ์ž…") + private let iconImageView = UIImageView() + private let actionButton = UIButton.makeActionButton(with: "๋ฐ›๊ธฐ") + private let categoryLabel = UILabel() + private let rankingLabel = UILabel() + + + override init(frame: CGRect) { + super.init(frame: frame) + contentView.backgroundColor = .black + setUI() + setupActions() + setStyle() + setLayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setStyle() { + + + titleLabel.do { + $0.numberOfLines = 2 + $0.textColor = .white + } + + iconImageView.do { + $0.layer.cornerRadius = 10 + $0.clipsToBounds = true + } + categoryLabel.do{ + $0.textColor = .systemGray + } + rankingLabel.do { + $0.textColor = .white + } + purchaseLabel.do { + $0.textColor = .lightGray + } + } + + + private func setUI() { + [ + iconImageView, + rankingLabel, + actionButton, + categoryLabel, + titleLabel, + purchaseLabel + ].forEach { addSubview($0) } + + } + + private func setLayout() { + + + iconImageView.snp.makeConstraints { + $0.top.equalToSuperview().offset(10) + $0.leading.equalToSuperview().offset(15) + $0.size.equalTo(65) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + rankingLabel.snp.makeConstraints { + $0.leading.equalTo(iconImageView.snp.trailing).offset(8) + $0.top.equalTo(iconImageView.snp.top).offset(8) + } + + titleLabel.snp.makeConstraints { + $0.leading.equalTo(rankingLabel.snp.trailing).offset(8) + $0.top.equalTo(rankingLabel.snp.top) + $0.trailing.equalTo(actionButton.snp.leading).offset(-8) + } + + categoryLabel.snp.makeConstraints { + $0.leading.equalTo(titleLabel.snp.leading) + $0.top.equalTo(titleLabel.snp.bottom).offset(4) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + purchaseLabel.snp.makeConstraints { + $0.centerX.equalTo(actionButton) + $0.top.equalTo(actionButton.snp.bottom).offset(3) + $0.bottom.lessThanOrEqualToSuperview().offset(-10) + } + + actionButton.snp.makeConstraints { + $0.top.equalTo(rankingLabel) + $0.trailing.equalToSuperview().offset(-15) + $0.width.equalTo(50) + $0.height.equalTo(24) + } + } + + func configure(app: App) { + iconImageView.image = app.iconImage + rankingLabel.text = app.ranking.description + titleLabel.text = app.title + categoryLabel.text = app.category + purchaseLabel.text = app.subTitle + actionButton.setTitle(app.downloadState.rawValue, for: .normal) + } + + private func setupActions() { + actionButton.addTarget(self, action: #selector(actionButtonTapped), for: .touchUpInside) + } + + @objc private func actionButtonTapped() { + onActionButtonTapped?() + } + +} + + + + + + + + +struct AppRowView_CollectionPreview: UIViewRepresentable { + func makeUIView(context: Context) -> AppRowView_Collection { + let cell = AppRowView_Collection() + cell.configure(app: App( + iconImage: UIImage(named: "Toss_App_Icon")!, + title: "facebook", + downloadState: .dawnload, + subTitle: "์•ฑ๋‚ด ๊ตฌ๋งค", + category: "Entertainment", + ranking: 1 + )) + return cell + } + + func updateUIView(_ uiView: AppRowView_Collection, context: Context) {} + +} + + + + +#Preview { + AppRowView_CollectionPreview() +} + diff --git a/Sopt_Appstore/VIew/FinanceView/ApptitleView.swift b/Sopt_Appstore/VIew/FinanceView/ApptitleView.swift new file mode 100644 index 0000000..fd9d206 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/ApptitleView.swift @@ -0,0 +1,75 @@ +// +// ApptitleView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/30/24. +// + + +import UIKit +import SnapKit + +class ApptitleView: UIView { + + var onArrowButtonTapped: (() -> Void)? + + private let titleLabel: UILabel = { + let label = UILabel() + label.font = UIFont.boldSystemFont(ofSize: 24) + label.textColor = .white + return label + }() + + private let arrowButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(systemName: "chevron.right"), for: .normal) + button.tintColor = .white + button.contentMode = .scaleAspectFit + return button + }() + + override init(frame: CGRect) { + super.init(frame: frame) + setupViews() + setupConstraints() + setupActions() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + setupViews() + setupConstraints() + setupActions() + } + + func configure(title: String) { + titleLabel.text = title + } + + private func setupViews() { + backgroundColor = .black + addSubview(titleLabel) + addSubview(arrowButton) + } + + private func setupConstraints() { + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(16) + make.centerY.equalToSuperview() + } + + arrowButton.snp.makeConstraints { make in + make.leading.equalTo(titleLabel.snp.trailing).offset(5) + make.centerY.equalTo(titleLabel) + make.width.height.equalTo(20) + } + } + + private func setupActions() { + arrowButton.addTarget(self, action: #selector(arrowButtonTapped), for: .touchUpInside) + } + + @objc private func arrowButtonTapped() { + onArrowButtonTapped?() + } +} diff --git a/Sopt_Appstore/VIew/FinanceView/FinanceViewController.swift b/Sopt_Appstore/VIew/FinanceView/FinanceViewController.swift new file mode 100644 index 0000000..283eaf5 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/FinanceViewController.swift @@ -0,0 +1,211 @@ +// +// FinanceView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/30/24. +// + +import UIKit +import SnapKit + +class FinanceViewController: UIViewController { + + private let scrollView = UIScrollView() + private let containerView = UIView() + + private let appViewTitle_Top_Sub: UILabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 15) + label.textColor = .systemGray + label.text = "APP Store EditorใŒ่งฆๆŽฅๆฑบใ‚ใพใ—ใŸใ‚“ใงใ™๏ผ" + return label + }() + + + private let headScrollView = HeadScrollView() + private let appViewTitle_Top = ApptitleView() + private let appViewTitle_Mid = ApptitleView() + private let appViewTitle_Bot = ApptitleView() + + private let appHorizontalScrollView_Top = AppHorizontalScrollView() + private let appHorizontalScrollView_Mid = AppHorizontalScrollView() + private let appHorizontalScrollView_Bot = AppHorizontalScrollView() + + private let myTabBarController = UITabBarController() + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = .black + + + setupTabBarController() + setupScrollView() + setLayoutConstraints() + setupNavigationBar() + + appViewTitle_Top.configure(title: "ํ•„์ˆ˜ ๊ธˆ์œต ์•ฑ") + appViewTitle_Mid.configure(title: "์œ ๋ฃŒ ์ˆœ์œ„") + appViewTitle_Bot.configure(title: "๋ฌด๋ฃŒ ์ˆœ์œ„") + + appViewTitle_Bot.onArrowButtonTapped = { [weak self] in + guard let self = self else { return } + let chartListViewController = ChartListView() + self.navigationController?.pushViewController(chartListViewController, animated: true) + } + } + + private func setupNavigationBar() { + let backButtonView = UIView() + let backImageView = UIImageView(image: UIImage(systemName: "chevron.left")) + let backLabel = UILabel() + + backImageView.tintColor = .systemBlue + backImageView.contentMode = .scaleAspectFit + + backLabel.text = "๊ฒ€์ƒ‰" + backLabel.textColor = .systemBlue + backLabel.font = UIFont.systemFont(ofSize: 17) + + let stackView = UIStackView(arrangedSubviews: [backImageView, backLabel]) + stackView.axis = .horizontal + stackView.spacing = 5 + stackView.alignment = .center + + backButtonView.addSubview(stackView) + stackView.snp.makeConstraints { make in + + make.edges.equalToSuperview() + } + + let backButton = UIBarButtonItem(customView: backButtonView) + navigationItem.leftBarButtonItem = backButton + + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + navigationController?.navigationBar.standardAppearance = appearance + navigationController?.navigationBar.scrollEdgeAppearance = appearance + } + + private func setupTabBarController() { + let todayVC = UIViewController() + let gameVC = UIViewController() + let appVC = UIViewController() + let arcadeVC = UIViewController() + let searchVC = UIViewController() + + todayVC.tabBarItem = UITabBarItem(title: "ํˆฌ๋ฐ์ด", image: UIImage(systemName: "house.fill"), tag: 0) + gameVC.tabBarItem = UITabBarItem(title: "๊ฒŒ์ž„", image: UIImage(systemName: "gamecontroller.fill"), tag: 1) + appVC.tabBarItem = UITabBarItem(title: "์•ฑ", image: UIImage(systemName: "app.fill"), tag: 2) + arcadeVC.tabBarItem = UITabBarItem(title: "์•„์ผ€์ด๋“œ", image: UIImage(systemName: "cube.box.fill"), tag: 3) + searchVC.tabBarItem = UITabBarItem(title: "๊ฒ€์ƒ‰", image: UIImage(systemName: "magnifyingglass"), tag: 4) + + myTabBarController.viewControllers = [todayVC, gameVC, appVC, arcadeVC, searchVC] + + let appearance = UITabBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = UIColor(red: 25/255, green: 25/255, blue: 25/255, alpha: 1) + + myTabBarController.tabBar.standardAppearance = appearance + if #available(iOS 15.0, *) { + myTabBarController.tabBar.scrollEdgeAppearance = appearance + } + + myTabBarController.tabBar.tintColor = .white + myTabBarController.tabBar.unselectedItemTintColor = .lightGray + + addChild(myTabBarController) + view.addSubview(myTabBarController.view) + myTabBarController.didMove(toParent: self) + + myTabBarController.view.snp.makeConstraints { make in + make.leading.trailing.bottom.equalTo(view) + make.height.equalTo(50) + } + } + + private func setupScrollView() { + view.addSubview(scrollView) + scrollView.addSubview(containerView) + + scrollView.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide) + make.leading.trailing.equalToSuperview() + make.bottom.equalTo(myTabBarController.tabBar.snp.top) + } + + containerView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.width.equalTo(scrollView) + } + } + + private func setLayoutConstraints() { + containerView.addSubview(headScrollView) + containerView.addSubview(appViewTitle_Top) + containerView.addSubview(appViewTitle_Top_Sub) + containerView.addSubview(appHorizontalScrollView_Top.view) + + containerView.addSubview(appViewTitle_Mid) + containerView.addSubview(appHorizontalScrollView_Mid.view) + + containerView.addSubview(appViewTitle_Bot) + containerView.addSubview(appHorizontalScrollView_Bot.view) + + headScrollView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.horizontalEdges.equalToSuperview() + make.height.equalTo(300) + } + + appViewTitle_Top.snp.makeConstraints { make in + make.top.equalTo(headScrollView.snp.bottom) + make.horizontalEdges.equalToSuperview() + make.height.equalTo(40) + } + + appViewTitle_Top_Sub.snp.makeConstraints { make in + make.top.equalTo(appViewTitle_Top.snp.bottom) + make.horizontalEdges.equalToSuperview().inset(15) + make.height.equalTo(15) + } + + appHorizontalScrollView_Top.view.snp.makeConstraints { make in + make.top.equalTo(appViewTitle_Top_Sub.snp.bottom) + make.leading.trailing.equalToSuperview() + make.height.equalTo(260) + } + + appViewTitle_Mid.snp.makeConstraints { make in + make.top.equalTo(appHorizontalScrollView_Top.view.snp.bottom).offset(15) + make.horizontalEdges.equalToSuperview() + make.height.equalTo(40) + } + + appHorizontalScrollView_Mid.view.snp.makeConstraints { make in + make.top.equalTo(appViewTitle_Mid.snp.bottom) + make.leading.trailing.equalToSuperview() + make.height.equalTo(260) + } + + appViewTitle_Bot.snp.makeConstraints { make in + make.top.equalTo(appHorizontalScrollView_Mid.view.snp.bottom).offset(15) + make.horizontalEdges.equalToSuperview() + make.height.equalTo(40) + } + + appHorizontalScrollView_Bot.view.snp.makeConstraints { make in + make.top.equalTo(appViewTitle_Bot.snp.bottom) + make.leading.trailing.equalToSuperview() + make.height.equalTo(260) + make.bottom.equalToSuperview() + } + } +} + +#Preview { + + let navController = UINavigationController(rootViewController: FinanceViewController()) + return navController + +} diff --git a/Sopt_Appstore/VIew/FinanceView/HeadScrollViewRow/HeadScrollView.swift b/Sopt_Appstore/VIew/FinanceView/HeadScrollViewRow/HeadScrollView.swift new file mode 100644 index 0000000..07341c9 --- /dev/null +++ b/Sopt_Appstore/VIew/FinanceView/HeadScrollViewRow/HeadScrollView.swift @@ -0,0 +1,64 @@ +// +// HeadScrollView.swift +// Sopt_Appstore +// +// Created by Jaehyun Ahn on 10/31/24. +// + +import UIKit +import SnapKit + +class HeadScrollView: UIView { + + private let headScrollView: UIScrollView = { + let scrollView = UIScrollView() + scrollView.showsHorizontalScrollIndicator = false + scrollView.isPagingEnabled = true + return scrollView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + setupViews() + setupConstraints() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setupViews() { + addSubview(headScrollView) + + let numberOfCards = 3 + let viewWidth = UIScreen.main.bounds.width + var previousCard: UIView? + + for _ in 0..