Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design] #100-스플래시 화면 UI #101

Merged
merged 3 commits into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 60 additions & 2 deletions HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
695758E02881228700E36789 /* CopingHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 695758DF2881228700E36789 /* CopingHeaderView.swift */; };
695758E328812B3100E36789 /* CopingDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 695758E228812B3100E36789 /* CopingDataModel.swift */; };
695758E52881852F00E36789 /* CopingEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 695758E42881852E00E36789 /* CopingEmptyView.swift */; };
695758EC28830E3000E36789 /* SplashVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 695758EB28830E3000E36789 /* SplashVC.swift */; };
695758EE28830E3F00E36789 /* Splash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 695758ED28830E3F00E36789 /* Splash.storyboard */; };
695758F128830EC400E36789 /* splash_ios.json in Resources */ = {isa = PBXBuildFile; fileRef = 695758F028830EC400E36789 /* splash_ios.json */; };
75CF9028E2A4677BC9470A70 /* Pods_HealthFoodMe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1D3D3B2D1590CCD44253F6D /* Pods_HealthFoodMe.framework */; };
A9325274287D3065001EDF50 /* SearchResultTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9325273287D3065001EDF50 /* SearchResultTVC.swift */; };
A9325277287D4F10001EDF50 /* SearchResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9325276287D4F10001EDF50 /* SearchResultModel.swift */; };
Expand Down Expand Up @@ -230,8 +233,9 @@
695758DF2881228700E36789 /* CopingHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopingHeaderView.swift; sourceTree = "<group>"; };
695758E228812B3100E36789 /* CopingDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopingDataModel.swift; sourceTree = "<group>"; };
695758E42881852E00E36789 /* CopingEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopingEmptyView.swift; sourceTree = "<group>"; };
695758C9288057D700E36789 /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
695758CF2880ACF000E36789 /* addToolBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = addToolBar.swift; sourceTree = "<group>"; };
695758EB28830E3000E36789 /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = "<group>"; };
695758ED28830E3F00E36789 /* Splash.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Splash.storyboard; sourceTree = "<group>"; };
695758F028830EC400E36789 /* splash_ios.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = splash_ios.json; path = ../../../../../../../../Downloads/splash_ios.json; sourceTree = "<group>"; };
6E596B9EBEC8B18D4DE266B6 /* Pods-HealthFoodMe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HealthFoodMe.release.xcconfig"; path = "Target Support Files/Pods-HealthFoodMe/Pods-HealthFoodMe.release.xcconfig"; sourceTree = "<group>"; };
A9325273287D3065001EDF50 /* SearchResultTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultTVC.swift; sourceTree = "<group>"; };
A9325276287D4F10001EDF50 /* SearchResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -553,6 +557,55 @@
path = ViewModel;
sourceTree = "<group>";
};
695758E628830C3100E36789 /* Splash */ = {
isa = PBXGroup;
children = (
695758E728830CFB00E36789 /* SplashScene */,
);
path = Splash;
sourceTree = "<group>";
};
695758E728830CFB00E36789 /* SplashScene */ = {
isa = PBXGroup;
children = (
695758E828830D0800E36789 /* VC */,
695758E928830D1D00E36789 /* Views */,
695758EA28830D3400E36789 /* ViewModel */,
);
path = SplashScene;
sourceTree = "<group>";
};
695758E828830D0800E36789 /* VC */ = {
isa = PBXGroup;
children = (
695758EB28830E3000E36789 /* SplashVC.swift */,
695758ED28830E3F00E36789 /* Splash.storyboard */,
);
path = VC;
sourceTree = "<group>";
};
695758E928830D1D00E36789 /* Views */ = {
isa = PBXGroup;
children = (
);
path = Views;
sourceTree = "<group>";
};
695758EA28830D3400E36789 /* ViewModel */ = {
isa = PBXGroup;
children = (
);
path = ViewModel;
sourceTree = "<group>";
};
695758EF28830EA800E36789 /* Lottie */ = {
isa = PBXGroup;
children = (
695758F028830EC400E36789 /* splash_ios.json */,
);
path = Lottie;
sourceTree = "<group>";
};
697074FB28737D78001A607F /* MenuTabScene */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1144,6 +1197,7 @@
EBF66A68287227F500DE0ED1 /* Resources */ = {
isa = PBXGroup;
children = (
695758EF28830EA800E36789 /* Lottie */,
EBF66A69287227F500DE0ED1 /* Assets.xcassets */,
A9E593CE2876C26900B0F8B5 /* Color.xcassets */,
EBF66A6A287227F500DE0ED1 /* Fonts */,
Expand Down Expand Up @@ -1298,6 +1352,7 @@
EBF66A90287227F500DE0ED1 /* Presentation */ = {
isa = PBXGroup;
children = (
695758E628830C3100E36789 /* Splash */,
A93252AE287F2AD7001EDF50 /* Scrap */,
A9325272287D24CD001EDF50 /* Search */,
3BCC441A28745FA900661A12 /* Auth */,
Expand Down Expand Up @@ -1567,6 +1622,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
695758F128830EC400E36789 /* splash_ios.json in Resources */,
FDA3AEF12880610C00D6CCB4 /* UserWithdrawal.storyboard in Resources */,
EB6A44C7287366DF00749582 /* .swiftlint.yml in Resources */,
3B0B25582876BBE400950539 /* NotoSansCJKkr-Bold.otf in Resources */,
Expand Down Expand Up @@ -1594,6 +1650,7 @@
EBF66AD1287227F500DE0ED1 /* NotoSansSC-Bold.otf in Resources */,
3B0B25592876BBE400950539 /* NotoSansCJKkr-Medium.otf in Resources */,
3B723CA52881B36F00822B7C /* ReviewDetail.storyboard in Resources */,
695758EE28830E3F00E36789 /* Splash.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1777,6 +1834,7 @@
EB6A450C2873D6C500749582 /* DetailSummaryView.swift in Sources */,
A93252AD287F09D0001EDF50 /* SearchEmptyView.swift in Sources */,
695758E02881228700E36789 /* CopingHeaderView.swift in Sources */,
695758EC28830E3000E36789 /* SplashVC.swift in Sources */,
EBF66ACC287227F500DE0ED1 /* BaseNotiList.swift in Sources */,
EBF66AD8287227F500DE0ED1 /* BaseControllable.swift in Sources */,
EBF66ABF287227F500DE0ED1 /* UITabBar+.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ protocol ModuleFactoryProtocol {

// MARK: - Scrap
func makeScrapVC() -> ScrapVC

// MARK: - Spalsh
func makeSplashVC() -> SplashVC
}

class ModuleFactory: ModuleFactoryProtocol {
Expand Down Expand Up @@ -136,6 +139,12 @@ class ModuleFactory: ModuleFactoryProtocol {

return vc
}

func makeSplashVC() -> SplashVC {
let vc = SplashVC.controllerFromStoryboard(.splash)

return vc
}

// MARK: - Plan

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}

guard let windowScene = (scene as? UIWindowScene) else { return }
let rootViewController = ModuleFactory.resolve().makeMainMapVC()
let rootViewController = ModuleFactory.resolve().makeSplashVC()
let navigation = UINavigationController(rootViewController: rootViewController)
let window = UIWindow(windowScene: windowScene)
window.rootViewController = navigation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import UIKit
*/

enum Storyboards: String {
case splash = "Splash"
case mainMap = "MainMap"
case mainDetail = "MainDetail"
case search = "Search"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--SplashVC-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="SplashVC" id="Y6W-OH-hqX" customClass="SplashVC" customModule="HealthFoodMe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="83" y="40"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// SplashVC.swift
// HealthFoodMe
//
// Created by 최영린 on 2022/07/17.
//

import UIKit

import Lottie

class SplashVC: UIViewController {

// MARK: - UI Components

private let animationView: AnimationView = .init(name: "splash_ios")

// MARK: - View Life Cycle

override func viewDidLoad() {
super.viewDidLoad()
setUI()
setLayout()
playAnimation()
presentToMainMap()
}
}

// MARK: - Methods

extension SplashVC {
private func setUI() {
self.navigationController?.isNavigationBarHidden = true
}

private func setLayout() {
self.view.addSubview(animationView)

animationView.frame = self.view.bounds
animationView.center = self.view.center
animationView.contentMode = .scaleAspectFit
}

private func playAnimation() {
animationView.play()
}

private func presentToMainMap() {
DispatchQueue.main.asyncAfter(deadline: .now()+3) {
let vc = ModuleFactory.resolve().makeMainMapVC()
vc.modalPresentationStyle = .overFullScreen
self.present(vc, animated: true)
}
}
}

// MARK: - Network

extension SplashVC {

}
1 change: 1 addition & 0 deletions HealthFoodMe/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ target 'HealthFoodMe' do
pod 'Kingfisher', '~> 7.0'
pod 'SwiftLint'
pod 'BSImagePicker', '~> 3.1'
pod 'lottie-ios'

end
6 changes: 5 additions & 1 deletion HealthFoodMe/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ PODS:
- KakaoSDKUser (2.11.0):
- KakaoSDKAuth (= 2.11.0)
- Kingfisher (7.2.4)
- lottie-ios (3.4.0)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
Expand Down Expand Up @@ -147,6 +148,7 @@ DEPENDENCIES:
- KakaoSDKAuth
- KakaoSDKUser
- Kingfisher (~> 7.0)
- lottie-ios
- NMapsMap
- RealmSwift (~> 10)
- RxCocoa (= 6.5.0)
Expand Down Expand Up @@ -174,6 +176,7 @@ SPEC REPOS:
- KakaoSDKCommon
- KakaoSDKUser
- Kingfisher
- lottie-ios
- nanopb
- NMapsMap
- PromisesObjC
Expand Down Expand Up @@ -204,6 +207,7 @@ SPEC CHECKSUMS:
KakaoSDKCommon: 0f59f2c1aead6012d92758e8ca46b63ea11c408b
KakaoSDKUser: 5dbefe494c50dfdc87e4072710e503d39b41a609
Kingfisher: 2457be2121734e69e54a2312ecc0150eb9ae70b3
lottie-ios: 69495122151a378fdc7d1bb4c5930347e37baf1f
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
NMapsMap: f151761c088d6516064c59da03ab6503769486e6
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
Expand All @@ -215,6 +219,6 @@ SPEC CHECKSUMS:
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SwiftLint: f80f1be7fa96d30e0aa68e58d45d4ea1ccaac519

PODFILE CHECKSUM: 328889e8eb35a650f9e8953209d54dc43875ba27
PODFILE CHECKSUM: c554279c7ddb13cf5871f9b4e7f4f2d4884f2c79

COCOAPODS: 1.11.3