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

✨ Splash 화면 노출 구현 #19

Merged
merged 1 commit into from
Jan 1, 2021
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
4 changes: 0 additions & 4 deletions Dear-World/Dear-World.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
395826332596E693007325AB /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 395826322596E693007325AB /* Logger.swift */; };
395A4177259DF9F900F10531 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 395A4176259DF9F900F10531 /* MainTabBarController.swift */; };
39658F8D259AD9900050D180 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39658F8C259AD9900050D180 /* SplashViewController.swift */; };
39658F92259AD9B70050D180 /* SplashReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39658F91259AD9B70050D180 /* SplashReactor.swift */; };
39658F9B259ADB130050D180 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = 39658F9A259ADB130050D180 /* Lottie */; };
39658FA0259ADE770050D180 /* splash_1x.json in Resources */ = {isa = PBXBuildFile; fileRef = 39658F9F259ADE770050D180 /* splash_1x.json */; };
39658FAF259AE4E40050D180 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39658FAE259AE4E40050D180 /* World.swift */; };
Expand Down Expand Up @@ -120,7 +119,6 @@
395826322596E693007325AB /* Logger.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; tabWidth = 2; };
395A4176259DF9F900F10531 /* MainTabBarController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = "<group>"; tabWidth = 2; };
39658F8C259AD9900050D180 /* SplashViewController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = "<group>"; tabWidth = 2; };
39658F91259AD9B70050D180 /* SplashReactor.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = SplashReactor.swift; sourceTree = "<group>"; tabWidth = 2; };
39658F9F259ADE770050D180 /* splash_1x.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = splash_1x.json; sourceTree = "<group>"; };
39658FAE259AE4E40050D180 /* World.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = World.swift; sourceTree = "<group>"; tabWidth = 2; };
39658FB5259AE5250050D180 /* World.API.Rank.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = World.API.Rank.swift; sourceTree = "<group>"; tabWidth = 2; };
Expand Down Expand Up @@ -434,7 +432,6 @@
isa = PBXGroup;
children = (
39658F8C259AD9900050D180 /* SplashViewController.swift */,
39658F91259AD9B70050D180 /* SplashReactor.swift */,
);
path = Splash;
sourceTree = "<group>";
Expand Down Expand Up @@ -717,7 +714,6 @@
39658FAF259AE4E40050D180 /* World.swift in Sources */,
3971EB24259A7C420084E6DC /* Emoji.Model.Random.swift in Sources */,
39F0C1632597B34F00A7001F /* UIView+.swift in Sources */,
39658F92259AD9B70050D180 /* SplashReactor.swift in Sources */,
3971EB1F259A7C0E0084E6DC /* Emoji.API.Random.swift in Sources */,
3902F1052596F26D00A3DF8C /* CheeringMapViewController.swift in Sources */,
39F0C1B72598927C00A7001F /* ErrorView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@ import UIKit

final class MainTabBarController: UITabBarController {

private var isFirstLaunch: Bool = true

override func viewDidLoad() {
super.viewDidLoad()

setupTabBar()
self.delegate = self
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

if isFirstLaunch {
isFirstLaunch = false
presentSplashViewController()
}
}

private func presentSplashViewController() {
let splashViewController: UIViewController = SplashViewController().then {
$0.modalPresentationStyle = .fullScreen
}
self.present(splashViewController, animated: false, completion: nil)
}

private func setupTabBar() {
let discoverViewController: UIViewController = DiscoverViewController().then {
$0.tabBarItem.image = UIImage(named: "message_default")?
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ final class SplashViewController: UIViewController {
$0.edges.equalToSuperview()
$0.center.equalToSuperview()
}
animationView.play()
animationView.play { [weak self] _ in
self?.dismiss(animated: false, completion: nil)
}
}
}