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

[TEST] 일기 코칭 및 상세 코칭 기능 테스트 플라이트 등록 #243

Merged
merged 48 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9767a2a
[Chore] #233 - 기기대응 코드 간소화
joonBaek12 Dec 1, 2024
f1205e0
[Feat] #233 - 뒤로가기 기능 구현
joonBaek12 Dec 3, 2024
fb17b5a
[Feat] #233 - DetailDiaryCoachedView API
joonBaek12 Dec 3, 2024
0030e71
[Chore] #233 - 네비바 상태관리 수정
joonBaek12 Dec 5, 2024
32a1cbd
[FEAT] #235 - SwiftUI 기준 로딩뷰 구현
cchanmi Dec 8, 2024
4105d0d
[FEAT] #235 - 화면 전환 후 버튼색 바뀌는 현상 수정
cchanmi Dec 8, 2024
2079066
[CHORE] #235 - 코칭 후 변경된 텍스트 반영
cchanmi Dec 8, 2024
53c52a7
[CHORE] #235 - 폴더링
cchanmi Dec 8, 2024
540f4c3
[DELETE] #235 - 불필요한 파일 삭제
cchanmi Dec 8, 2024
f7bdf58
[CHORE] #235 - yml 수정
cchanmi Dec 8, 2024
aac6313
[Feat] #233 - EditDiaryView 래핑
joonBaek12 Dec 9, 2024
34f48c7
[Feat] #223 - DeleteDiaryAPI 연결
joonBaek12 Dec 10, 2024
209b006
Merge pull request #236 from Team-Smeme/feat/#235-QA
cchanmi Dec 10, 2024
d3600bd
[Chore] #233 - CustomSegmentControl Style 변경
joonBaek12 Dec 10, 2024
a2ec539
[CHORE] #235 - 폴더링 수정
cchanmi Dec 10, 2024
75933c2
[Fix] #223 - 충돌 해결
joonBaek12 Dec 10, 2024
c75f54c
[CHORE] #235 - 레이아웃 수정 및 폰트 weight 수정
cchanmi Dec 10, 2024
bc7b64e
[Fix] #233 - EditViewController 네비게이션 이슈
joonBaek12 Dec 10, 2024
e9c77c3
[CHORE] #235 - 완벽한 문장 filter 기능 추가
cchanmi Dec 10, 2024
f3f9a74
[FEAT] #235 - 첨삭 일기 10개 제한 테스트 코드 작성
cchanmi Dec 10, 2024
b0f6c02
[FEAT] #235 - 원문 문장 조합 기능 구현 및 테스트 코드 작성
cchanmi Dec 10, 2024
ea8de32
[Feat] #233 - 에러처리 및 토스트 연결
joonBaek12 Dec 10, 2024
6b71fbb
Merge pull request #238 from Team-Smeme/feat/#235-QA
cchanmi Dec 10, 2024
2369602
[Chore] #233 - 팝업 메시지 익스텐션화
joonBaek12 Dec 10, 2024
6f48b4e
[FEAT] #239 - diary detail amplitude
cchanmi Dec 10, 2024
0ac7089
Merge remote-tracking branch 'origin/develop' into chore/#233-DeviceR…
joonBaek12 Dec 10, 2024
f60fc15
[Fix] #233 - 토스트 메시지 레이아웃 이슈
joonBaek12 Dec 10, 2024
4b628b9
Merge pull request #237 from Team-Smeme/chore/#233-DeviceRatio
joonBaek12 Dec 10, 2024
1f5483f
[MERGE} #239 - PUll Develop
cchanmi Dec 10, 2024
73cc933
[Add] #239 - Double+ 누락 파일 추가
joonBaek12 Dec 10, 2024
123dae5
[FEAT] #239 - coaching amplitude 추가
cchanmi Dec 10, 2024
f051ec2
Merge remote-tracking branch 'origin/feat/#239-amplitude' into feat/#…
cchanmi Dec 10, 2024
ad2d86b
[FEAT] #239 - Coaching Amplitude 연결
cchanmi Dec 10, 2024
c3c44e3
[Fix] #233 - 네비게이션 스택 이슈, 코칭 filter 및 바인딩 이슈
joonBaek12 Dec 11, 2024
d6b6a33
[Fix] #241 - CustomSegmentedControl UI 이슈
joonBaek12 Dec 11, 2024
585ffa2
[CHORE] #239 - 업데이트 팝업 로직 수정
cchanmi Dec 11, 2024
9ffc1be
[Feat] #241 - RandomTopicSwiftUI View 구현 및 데이터 바인딩
joonBaek12 Dec 11, 2024
f0c3c44
[FEAT] #241 - 코칭 불필요한 일기일 경우 text, 컴포넌트 분기 처리
cchanmi Dec 12, 2024
0158198
[Fix] #241- 취소버튼 네비게이션 관련 이슈
joonBaek12 Dec 12, 2024
98ec196
Merge remote-tracking branch 'origin/fix/241-QA' into fix/241-QA
joonBaek12 Dec 12, 2024
dae00ac
Merge pull request #242 from Team-Smeme/fix/241-QA
cchanmi Dec 12, 2024
8a421b0
[MERGE] #239 Pull Develop
cchanmi Dec 12, 2024
e765d2e
[Fix] #239 - SegmentedControl 폰트 깨짐 수정
joonBaek12 Dec 12, 2024
25dc060
[Feat] #239 - 일기 상세보기 앰플리튜드 구현
joonBaek12 Dec 12, 2024
a33d334
[TEST] #239 - detail diary test code model 수정
cchanmi Dec 12, 2024
69905b7
[CHORE] #239 - 업데이트 버전 및 빌드 버전 관리
cchanmi Dec 12, 2024
8ad8e0f
[TEST] #239 - 강제 업데이트 로직 테스트 코드 작성
cchanmi Dec 12, 2024
537cc7c
Merge pull request #240 from Team-Smeme/feat/#239-amplitude
cchanmi Dec 12, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/smeemDev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Swift
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:
Expand Down
38 changes: 14 additions & 24 deletions Smeem-iOS/Smeem-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
375B628B2C590D0D00DA8E30 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 375B628A2C590D0D00DA8E30 /* FirebaseMessaging */; };
375B628D2C590D0D00DA8E30 /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = 375B628C2C590D0D00DA8E30 /* FirebaseRemoteConfig */; };
3761116C2A278D0E0095EC5A /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3761116B2A278D0E0095EC5A /* String+.swift */; };
376947892D0894A2006A46B1 /* Double+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376947882D0894A2006A46B1 /* Double+.swift */; };
377B3BF02CF613710086E0BC /* HighlightModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377B3BEF2CF613710086E0BC /* HighlightModifier.swift */; };
3785072F2BD1480C004CC922 /* SharedDiaryDataService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37499E3C2BD0C3A100BA6FAF /* SharedDiaryDataService.swift */; };
378B20EE2BA0A01600604935 /* ForeignDiaryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 378B20ED2BA0A01600604935 /* ForeignDiaryViewModel.swift */; };
Expand Down Expand Up @@ -263,6 +264,7 @@
374F828B2AC327A200C128B9 /* SmeemTextViewHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmeemTextViewHandler.swift; sourceTree = "<group>"; };
374FAF802A2CACCF00237A1A /* DiaryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiaryViewController.swift; sourceTree = "<group>"; };
3761116B2A278D0E0095EC5A /* String+.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = "<group>"; };
376947882D0894A2006A46B1 /* Double+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Double+.swift"; sourceTree = "<group>"; };
377B3BEF2CF613710086E0BC /* HighlightModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HighlightModifier.swift; sourceTree = "<group>"; };
378B20ED2BA0A01600604935 /* ForeignDiaryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForeignDiaryViewModel.swift; sourceTree = "<group>"; };
378B20EF2BA0A02400604935 /* StepOneKoreanDiaryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepOneKoreanDiaryViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -446,23 +448,10 @@
A3D7ECB62A26566A009857D6 /* EditNicknameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditNicknameViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
370BD0B62CFB660C009560DB /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
CoachingComparisonView.swift,
CoachingCompletedView.swift,
CoachingExplanationView.swift,
CustomSegmentedControl.swift,
SwiftUINavigationView.swift,
);
target = 4A8FFA4B29C9E1FD00FB76C0 /* Smeem-iOS */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
377B3BF12CF618B90086E0BC /* SwiftUI */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = SwiftUI; sourceTree = "<group>"; };
4AB3494D2CF229D10047C484 /* UIViewConponent */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (370BD0B62CFB660C009560DB /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = UIViewConponent; sourceTree = "<group>"; };
4A17370E2D05C02E00B772C3 /* Toast */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Toast; sourceTree = "<group>"; };
4A17370F2D05C03600B772C3 /* LoadingView */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = LoadingView; sourceTree = "<group>"; };
4AB3494E2CF22A070047C484 /* Global */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Global; sourceTree = "<group>"; };
4AB3494F2CF22A250047C484 /* Button */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Button; sourceTree = "<group>"; };
4AB349502CF22A2E0047C484 /* TextView */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = TextView; sourceTree = "<group>"; };
Expand All @@ -473,7 +462,6 @@
4AB349BA2CF23B770047C484 /* Coaching */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Coaching; sourceTree = "<group>"; };
4AB349BC2CF23D210047C484 /* Coaching */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Coaching; sourceTree = "<group>"; };
4AF050CE2CE9DE010055BC3F /* Coaching */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Coaching; sourceTree = "<group>"; };
4AF050D72CEA01E20055BC3F /* DiaryComplete */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = DiaryComplete; sourceTree = "<group>"; };
4AF050D82CEA01EA0055BC3F /* Coaching */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Coaching; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

Expand Down Expand Up @@ -574,6 +562,7 @@
373D29912CBFE16B00A559A3 /* SwiftUI */ = {
isa = PBXGroup;
children = (
377B3BEF2CF613710086E0BC /* HighlightModifier.swift */,
373D29922CBFE17B00A559A3 /* View+.swift */,
);
path = SwiftUI;
Expand Down Expand Up @@ -618,7 +607,6 @@
37A574B929FE209F00312453 /* Resources */,
4AC4B82B2A2F9F5300E147AA /* Constants */,
37EB69E42A4B3B6B00075E4E /* Protocols */,
377B3BEF2CF613710086E0BC /* HighlightModifier.swift */,
);
path = Global;
sourceTree = "<group>";
Expand All @@ -627,7 +615,6 @@
isa = PBXGroup;
children = (
4AF050D82CEA01EA0055BC3F /* Coaching */,
4AF050D72CEA01E20055BC3F /* DiaryComplete */,
4AC047232A8FCA9700EBDC0E /* AuthManagement */,
4AA6FEE72C3ABD7C00E588E9 /* ResignSummray */,
4AA5E4B52BF24CEB00F308C8 /* BadgeBottomSheet */,
Expand Down Expand Up @@ -666,6 +653,7 @@
4A4FEB002B721956001BBDF3 /* Combine+.swift */,
4AB7C9182B75F9B500845733 /* GesturePublisher+.swift */,
4AF050EA2CEA300F0055BC3F /* MoyaProvier+.swift */,
376947882D0894A2006A46B1 /* Double+.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand All @@ -674,7 +662,6 @@
isa = PBXGroup;
children = (
377B3BF12CF618B90086E0BC /* SwiftUI */,
4AB3494D2CF229D10047C484 /* UIViewConponent */,
371107DB2ACAB4E3007A4AC2 /* Base */,
4A1EE9552A4DFB86007BFEF3 /* SmeemComponent */,
);
Expand Down Expand Up @@ -1018,6 +1005,8 @@
4A1EE9552A4DFB86007BFEF3 /* SmeemComponent */ = {
isa = PBXGroup;
children = (
4A17370F2D05C03600B772C3 /* LoadingView */,
4A17370E2D05C02E00B772C3 /* Toast */,
4AB349502CF22A2E0047C484 /* TextView */,
4AB3494F2CF22A250047C484 /* Button */,
4AB3494E2CF22A070047C484 /* Global */,
Expand Down Expand Up @@ -1752,7 +1741,8 @@
);
fileSystemSynchronizedGroups = (
377B3BF12CF618B90086E0BC /* SwiftUI */,
4AB3494D2CF229D10047C484 /* UIViewConponent */,
4A17370E2D05C02E00B772C3 /* Toast */,
4A17370F2D05C03600B772C3 /* LoadingView */,
4AB3494E2CF22A070047C484 /* Global */,
4AB3494F2CF22A250047C484 /* Button */,
4AB349502CF22A2E0047C484 /* TextView */,
Expand All @@ -1762,7 +1752,6 @@
4AB349562CF22BFF0047C484 /* EditUser */,
4AB349BA2CF23B770047C484 /* Coaching */,
4AF050CE2CE9DE010055BC3F /* Coaching */,
4AF050D72CEA01E20055BC3F /* DiaryComplete */,
4AF050D82CEA01EA0055BC3F /* Coaching */,
);
name = "Smeem-iOS";
Expand Down Expand Up @@ -1895,6 +1884,7 @@
4AC705AE2BECF0D4003C5310 /* EditPlanViewModel.swift in Sources */,
4AF7C22F2BFB797600E8C6CD /* LockBadgeCollectionViewCell.swift in Sources */,
6F294A3E2A26177B00856CC8 /* TrainingGoalViewController.swift in Sources */,
376947892D0894A2006A46B1 /* Double+.swift in Sources */,
4ABCBCCE2BDE95D0003138A8 /* MyPlanResponse.swift in Sources */,
4A9731D92BAAB70500DEC0C8 /* UpdateResponse.swift in Sources */,
4ABCBCEC2BE261B0003138A8 /* TrainingCollectionViewDatasource.swift in Sources */,
Expand Down Expand Up @@ -2287,7 +2277,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.3;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "Team.Smeem-dev";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2309,7 +2299,7 @@
CODE_SIGN_ENTITLEMENTS = "Smeem-iOS/Smeem-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Distribution: YuJi Lee (K8LLWYQWXD)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20241031;
CURRENT_PROJECT_VERSION = 2024121201;
DEVELOPMENT_TEAM = K8LLWYQWXD;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Smeem-iOS/Info.plist";
Expand All @@ -2325,7 +2315,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.3;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "Team.Smeem-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = smeem_release;
Expand Down
38 changes: 35 additions & 3 deletions Smeem-iOS/Smeem-iOS/Global/Constants/AmplitudeConstant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,24 @@ enum AmplitudeConstant {
}

enum diaryDetail {
case toggle_click(String)
case mydiary_click
case mydiary_edit
case mydiary_view(Bool)
case mydiary_edit(Bool)
case mydiary_edit_complete_click(Bool)

var event: BaseEvent {
switch self {
case .toggle_click(let toggle):
return BaseEvent(eventType: "toggle_click", eventProperties: ["toggle": toggle])
case .mydiary_click:
return BaseEvent(eventType: "mydiary_click", eventProperties: nil)
case .mydiary_edit:
return BaseEvent(eventType: "mydiary_edit", eventProperties: nil)
case .mydiary_view(let hasCoaching):
return BaseEvent(eventType: "mydiary_view", eventProperties: ["has_coaching": hasCoaching])
case .mydiary_edit(let hasCoaching):
return BaseEvent(eventType: "mydiary_edit", eventProperties: ["has_coaching": hasCoaching])
case .mydiary_edit_complete_click(let hasCoaching):
return BaseEvent(eventType: "mydiary_edit_complete_click", eventProperties: ["has_coaching": hasCoaching])
}
}
}
Expand Down Expand Up @@ -175,4 +184,27 @@ enum AmplitudeConstant {
}
}
}

enum coaching {
case coaching_try_click(Bool)
case coaching_exit_click(Bool)
case coaching_load_view
case coaching_result_view
case coaching_feedback_view(Int)

var event: BaseEvent {
switch self {
case .coaching_try_click(let isActive):
return BaseEvent(eventType: "coaching_try_click", eventProperties: ["active": isActive])
case .coaching_exit_click(let isActive):
return BaseEvent(eventType: "coaching_exit_click", eventProperties: ["active": isActive])
case .coaching_load_view:
return BaseEvent(eventType: "coaching_load_view", eventProperties: nil)
case .coaching_result_view:
return BaseEvent(eventType: "coaching_result_view", eventProperties: nil)
case .coaching_feedback_view(let index):
return BaseEvent(eventType: "badge_bottom_sheet_view", eventProperties: ["Index": index])
}
}
}
}
20 changes: 20 additions & 0 deletions Smeem-iOS/Smeem-iOS/Global/Extensions/Double+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Double+.swift
// Smeem-iOS
//
// Created by Joon Baek on 12/1/24.
//

import UIKit

extension Double {
// 너비 기반 스케일링 (iPhone 13 mini)
func scaledByWidth() -> Double {
return (self / 375) * UIScreen.main.bounds.width
}

// 높이 기반 스케일링 (iPhone 13 mini)
func scaledByHeight() -> Double {
return (self / 812) * UIScreen.main.bounds.height
}
}
72 changes: 71 additions & 1 deletion Smeem-iOS/Smeem-iOS/Global/Extensions/SwiftUI/View+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,88 @@ extension View {
}

var screenHeight: Double {
return screenSize.height
return screenSize.height
}

var screenWidth: Double {
return screenSize.width
}

func showEditConfirmation(
title: String,
message: String,
firstActionTitle: String,
secondActionTitle: String,
firstActionHandler: (() -> Void)? = nil,
secondActionHandler: (() -> Void)? = nil
) {
let alert = UIAlertController(
title: title,
message: message,
preferredStyle: .alert
)

alert.addAction(UIAlertAction(title: firstActionTitle, style: .cancel) { _ in
// 현재 presenting view controller를 찾아서 dismiss
if let presentedViewController = UIApplication.shared.windows.first?.rootViewController?.presentedViewController {
presentedViewController.dismiss(animated: true) {
firstActionHandler?()
}
}
})

alert.addAction(UIAlertAction(title: secondActionTitle, style: .default) { _ in
secondActionHandler?()
})

if let topViewController = UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.rootViewController {
topViewController.present(alert, animated: true)
}
}

func changeRootViewController(_ viewController: UIViewController) {
guard let window = UIApplication.shared.windows.first else { return }
UIView.transition(with: window, duration: 0.5, options: .transitionCrossDissolve, animations: {
let rootVC = UINavigationController(rootViewController: viewController)
window.rootViewController = rootVC
})
}

func pushToUIKitView(_ viewController: UIViewController, dismissFullScreenCover: Bool = true) {
// 현재 presenting된 view controller
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let rootViewController = windowScene.windows.first?.rootViewController {

// 현재 최상위 view controller (fullScreenCover 아래의 view controller)
var topViewController = rootViewController
while let presentedViewController = topViewController.presentedViewController {
topViewController = presentedViewController
}

if let navigationController = topViewController as? UINavigationController {
navigationController.pushViewController(viewController, animated: true)

if dismissFullScreenCover,
let presentingView = topViewController.presentingViewController {
presentingView.dismiss(animated: false, completion: nil)
}
}
}
}

func changeRootViewControllerAndPresent(_ viewControllerToPresent: UIViewController) {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first {

let navigationController = UINavigationController(rootViewController: viewControllerToPresent)
window.rootViewController = navigationController

UIView.transition(with: window,
duration: 0.5,
options: .transitionCrossDissolve,
animations: nil)

window.makeKeyAndVisible()
}
}
}
9 changes: 7 additions & 2 deletions Smeem-iOS/Smeem-iOS/Global/Extensions/UIViewController+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ extension UIViewController {

func changeRootViewControllerAndPresent(_ viewControllerToPresent: UIViewController) {
if let window = UIApplication.shared.windows.first {
window.rootViewController = viewControllerToPresent
UIView.transition(with: window, duration: 0.5, options: .transitionCrossDissolve, animations: nil)
let navigationController = UINavigationController(rootViewController: viewControllerToPresent)
window.rootViewController = navigationController

UIView.transition(with: window,
duration: 0.5,
options: .transitionCrossDissolve,
animations: nil)
} else {
viewControllerToPresent.modalPresentationStyle = .overFullScreen
self.present(viewControllerToPresent, animated: true, completion: nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// SmemeLoadingView.swift
// Smeem-iOS
//
// Created by 황찬미 on 11/26/24.
//

import SwiftUI

struct SmemeLoadingView: View {

var body: some View {
HStack {
Spacer()
VStack {
Spacer()
ProgressView()
Spacer()
}
Spacer()
}
.ignoresSafeArea()
.background(Color.white.opacity(0.1)) // 반투명 배경
.allowsHitTesting(true) // 로딩 중 터치 차단
}
}

struct SmemeEmptyView: View {

var body: some View {
ZStack {
Color.white.ignoresSafeArea()
}
.animation(.easeInOut(duration: 0.5), value: true) // 0.5초 뒤에 서서히 사라짐
}
}
Loading