fix: profile scene modal present UI issue. ticket: #22627EBN

This commit is contained in:
CMK 2021-07-07 19:07:47 +08:00
parent 5c71ffece9
commit 31f178eb3a
2 changed files with 10 additions and 2 deletions

View File

@ -141,7 +141,11 @@ extension SceneCoordinator {
if let navigationControllerVisibleViewController = presentingViewController.navigationController?.visibleViewController {
switch viewController {
case is ProfileViewController:
let barButtonItem = UIBarButtonItem(title: navigationControllerVisibleViewController.navigationItem.title, style: .plain, target: nil, action: nil)
let title: String = {
let title = navigationControllerVisibleViewController.navigationItem.title ?? ""
return title.count > 10 ? "" : title
}()
let barButtonItem = UIBarButtonItem(title: title, style: .plain, target: nil, action: nil)
barButtonItem.tintColor = .white
navigationControllerVisibleViewController.navigationItem.backBarButtonItem = barButtonItem
default:

View File

@ -152,7 +152,11 @@ extension ProfileViewController {
.store(in: &disposeBag)
let barAppearance = UINavigationBarAppearance()
barAppearance.configureWithTransparentBackground()
if isModal {
barAppearance.configureWithDefaultBackground()
} else {
barAppearance.configureWithTransparentBackground()
}
navigationItem.standardAppearance = barAppearance
navigationItem.compactAppearance = barAppearance
navigationItem.scrollEdgeAppearance = barAppearance