Skip to content

Commit eb2cec9

Browse files
authored
[NL-6] : Splash 화면 구현 (#14)
* [NL-6] : SplashVC 생성 - SplashVC view 완성 * [NL-6] : LaunchScreen 설정 - 로고 출력과 백그라운드 색상 변경 - appdelegate에서 screen 노출 시간 설정 * [NL-6] : SplashViewModel 생성 - 시작하기 버튼 이벤트 발생시 화면 이동 할 수 있도록 setting * [NL-6] : Splash 오류 해결 * [NL-6] : Onbarding 화면 생성 - 성별 까지 구현 완료 # Conflicts: # App/Sources/AppDelegate.swift # Core/Project.swift * [NL-6] : TimeRange BottomSheet 생성
1 parent 7bb6822 commit eb2cec9

File tree

34 files changed

+1869
-36
lines changed

34 files changed

+1869
-36
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "SattoLogoWhite.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
57
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
68
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
79
</dependencies>
@@ -11,15 +13,28 @@
1113
<objects>
1214
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
1315
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1517
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
18+
<subviews>
19+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SattoLogoWhite" translatesAutoresizingMaskIntoConstraints="NO" id="nPA-GC-4cY">
20+
<rect key="frame" x="125.66666666666667" y="388.66666666666669" width="142.33333333333331" height="45"/>
21+
</imageView>
22+
</subviews>
1723
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
24+
<color key="backgroundColor" red="0.41568627450980389" green="0.0" blue="1" alpha="1" colorSpace="calibratedRGB"/>
25+
<constraints>
26+
<constraint firstItem="nPA-GC-4cY" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="109.67" id="BDe-tH-oe2"/>
27+
<constraint firstAttribute="trailingMargin" secondItem="nPA-GC-4cY" secondAttribute="trailing" constant="109" id="hrm-zQ-U9H"/>
28+
<constraint firstAttribute="bottomMargin" secondItem="nPA-GC-4cY" secondAttribute="bottom" constant="384.25999999999999" id="ioh-GZ-hfB"/>
29+
</constraints>
1830
</view>
1931
</viewController>
2032
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
2133
</objects>
2234
<point key="canvasLocation" x="53" y="375"/>
2335
</scene>
2436
</scenes>
37+
<resources>
38+
<image name="SattoLogoWhite" width="157" height="45"/>
39+
</resources>
2540
</document>

App/Sources/AppDelegate.swift

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
import UIKit
2+
import Onboarding
3+
import Lib
4+
5+
import DIInjector
26

37
@main
48
class AppDelegate: UIResponder, UIApplicationDelegate {
5-
6-
func application(
7-
_ application: UIApplication,
8-
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9-
) -> Bool {
10-
// Override point for customization after application launch.
11-
return true
12-
}
13-
14-
// MARK: UISceneSession Lifecycle
15-
16-
func application(
17-
_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession,
18-
options: UIScene.ConnectionOptions
19-
) -> UISceneConfiguration {
20-
// Called when a new scene session is being created.
21-
// Use this method to select a configuration to create the new scene with.
22-
return UISceneConfiguration(
23-
name: "Default Configuration", sessionRole: connectingSceneSession.role)
24-
}
25-
26-
func application(
27-
_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>
28-
) {
29-
// Called when the user discards a scene session.
30-
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31-
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32-
}
33-
9+
10+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
11+
12+
return true
13+
}
14+
15+
// MARK: UISceneSession Lifecycle
16+
17+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
18+
19+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
20+
}
21+
22+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
23+
// Called when the user discards a scene session.
24+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
25+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
26+
}
27+
28+
private func dependencyInjection() {
29+
DependencyInjector.shared.assemble([
30+
CoreLayerAssembly()
31+
])
32+
}
33+
34+
private func registRouter() {
35+
36+
}
3437
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// CoreLayerAssembly.swift
3+
// Satto
4+
//
5+
// Created by 최재혁 on 7/23/25.
6+
//
7+
8+
import Foundation
9+
10+
import DIInjector
11+
import Lib
12+
13+
import Swinject
14+
15+
public class CoreLayerAssembly : Assembly {
16+
public func assemble(container: Container) {
17+
container.register(AppRouter.self) { _ in
18+
return AppRouter.shared
19+
}
20+
}
21+
}

App/Sources/SceneDelegate.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import UIKit
2+
import Onboarding
23

34
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
45

@@ -12,7 +13,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
1213
window = UIWindow(windowScene: windowScene)
1314
window?.windowScene = windowScene
1415

15-
let viewController = ViewController()
16+
// TODO: Splash로 이동 or Home으로 이동 선택 로직 필요
17+
let viewController = LaunchScreenViewController()
1618

1719
window?.rootViewController = viewController
1820
window?.makeKeyAndVisible()
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// AppRouter.swift
3+
// CommonLayer
4+
//
5+
// Created by 최재혁 on 7/23/25.
6+
//
7+
8+
import Foundation
9+
import UIKit
10+
11+
public protocol Routable {
12+
func navigate(to route : AppRoute, from : Routable?, with data : [String: Any])
13+
}
14+
15+
16+
public final class AppRouter : Routable {
17+
public static let shared = AppRouter()
18+
19+
private var factories : [AppRoute : () -> Routable] = [:]
20+
21+
private init() { }
22+
23+
public func register(route : AppRoute, factory : @escaping () -> Routable) {
24+
factories[route] = factory
25+
}
26+
27+
public func navigate(to route: AppRoute, from: Routable?, with data: [String : Any]) {
28+
guard let router = factories[route]?() else { return }
29+
guard let navigateType = data["navigateType"] as? NavigateType else { return }
30+
31+
// TODO: topview 찾고 -> UIWindow의 rootviewcon을 찾아서 -> Navigation이 될꺼고 -> 띄우는걸로
32+
// TODO: 모듈마다 모듈 내부 view 이동 router -> 해당 router는 approtuer 에서 관리
33+
// 여기서는 그냥 각 모듈을 present, push 하는 정도 역할만
34+
// 만약 스택을 비워야 한다면 해당 모듈에서 스택을 비우고 가는 걸로
35+
36+
// switch navigateType {
37+
// case .push:
38+
// if let navigationController = from?.navigationController {
39+
// navigationController.pushViewController(viewController, animated: true)
40+
// }
41+
// case .present:
42+
// from?.present(viewController, animated: true)
43+
// case .fullscreen:
44+
// viewController.modalPresentationStyle = .fullScreen
45+
// from?.present(viewController, animated: true)
46+
// case .currentContext:
47+
// viewController.modalPresentationStyle = .currentContext
48+
// from?.present(viewController, animated: true)
49+
// case .overFullScreen:
50+
// viewController.modalPresentationStyle = .overFullScreen
51+
// from?.present(viewController, animated: true)
52+
// case .overCurrentContext:
53+
// viewController.modalPresentationStyle = .overCurrentContext
54+
// from?.present(viewController, animated: true)
55+
// case .custom:
56+
// if let transitioningDelegate = data["transitioningDelegate"] as? UIViewControllerTransitioningDelegate {
57+
// viewController.modalPresentationStyle = .custom
58+
// viewController.transitioningDelegate = transitioningDelegate
59+
// }
60+
// from?.present(viewController, animated: true)
61+
// }
62+
63+
}
64+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// AppRoute.swift
3+
// CommonLayer
4+
//
5+
// Created by 최재혁 on 7/23/25.
6+
//
7+
8+
public enum AppRoute {
9+
case fortune
10+
case history
11+
case home
12+
case onboarding
13+
case setting
14+
case splash
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// NavigateType.swift
3+
// CommonLayer
4+
//
5+
// Created by 최재혁 on 7/23/25.
6+
//
7+
8+
public enum NavigateType {
9+
case push // NavigationController.pushViewController
10+
case present // 기본 present (모달)
11+
case fullscreen // modalPresentationStyle = .fullScreen
12+
case currentContext // modalPresentationStyle = .currentContext
13+
case overFullScreen // modalPresentationStyle = .overFullScreen
14+
case overCurrentContext // modalPresentationStyle = .overCurrentContext
15+
case custom // custom 전환 (transitioningDelegate 필요)
16+
}

Common/Lib/Sources/empty.swift

Whitespace-only changes.

0 commit comments

Comments
 (0)