-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix [#162] 로딩뷰 수정 #165
Fix [#162] 로딩뷰 수정 #165
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,14 @@ extension DontBeTabBarController: UITabBarControllerDelegate { | |
self.tabBar.items?[2].image = ImageLiterals.TabBar.icnNotificationRead | ||
} | ||
|
||
if beforeIndex == 2 && self.selectedIndex == 0 { | ||
showLoadingView() | ||
} | ||
|
||
if beforeIndex == 3 && self.selectedIndex == 0 { | ||
showLoadingView() | ||
} | ||
|
||
if let selectedViewController = tabBarController.selectedViewController { | ||
applyFontColorAttributes(to: selectedViewController.tabBarItem, isSelected: true) | ||
} | ||
|
@@ -200,3 +208,15 @@ extension DontBeTabBarController: UITabBarControllerDelegate { | |
return true | ||
} | ||
} | ||
|
||
extension DontBeTabBarController { | ||
private func showLoadingView() { | ||
let loadingView = DontBeLoadingView() | ||
loadingView.show() | ||
|
||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.4) { | ||
loadingView.hide { | ||
} | ||
} | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 주요 코드 리뷰:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 코드 패치의 코드 리뷰를 요청하셨습니다.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 리뷰 요약:
hasAppearedBefore
변수가 사용되지 않고 있으므로, 관련 코드를 제거해도 될 것으로 보입니다.showLoadingView()
메서드 역시 사용되지 않고 있으므로, 삭제하는 것이 좋을 것 같습니다.개선 사항:
위의 내용을 참고하여 코드를 개선하시기 바랍니다.