fix: profile scene modal present UI issue. ticket: #22627EBN
This commit is contained in:
parent
5c71ffece9
commit
31f178eb3a
|
@ -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:
|
||||
|
|
|
@ -152,7 +152,11 @@ extension ProfileViewController {
|
|||
.store(in: &disposeBag)
|
||||
|
||||
let barAppearance = UINavigationBarAppearance()
|
||||
if isModal {
|
||||
barAppearance.configureWithDefaultBackground()
|
||||
} else {
|
||||
barAppearance.configureWithTransparentBackground()
|
||||
}
|
||||
navigationItem.standardAppearance = barAppearance
|
||||
navigationItem.compactAppearance = barAppearance
|
||||
navigationItem.scrollEdgeAppearance = barAppearance
|
||||
|
|
Loading…
Reference in New Issue