Closed JacobVnu closed 9 months ago
Hello @JacobVnu
Thanks for the details and Sample app, it seems the issue is related to how you set the navbar color, setting it in AppDelegate does not maintain it across screens, basically when you show a new ViewController that removes the navigation bar, when it's re added again it doesn't maintain the same color. I was able to avoid this issue, by moving the nav bar code from App delegate to the HomeViewController viewWillAppear, this will maintain the red color across navigation steps.
override func viewWillAppear(_ animated: Bool) {
let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground()
appearance.backgroundColor = .red
appearance.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: UIColor.white,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12.0)
]
UINavigationBar.appearance().tintColor = .white
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
}
Let us know if we can help from our side.
Hi @mmohareb
Thank you for your reply. The App has a feature that, if we set the AppTheme in didFinishLaunching()
it will apply to entire app. And we don't need to reapply it again. The App was working well and it shows the NavigationBar color in all viewControllers. The issue start happening after the DocuSign SDK update into V 2.12. And we identified that the issue happening only after calling the DSMManager.login()
function.
Any progress on this? I do not set the navbar's color anywhere and after calling DSMManager.login() my app's navbar turns white and gives a docusign-blue background when scrolled.
I was able to avoid this issue, by moving the nav bar code from App delegate to the HomeViewController viewWillAppear, this will maintain the red color across navigation steps.
This is a workaround, it is not a resolution. I have an app that changes navigation bar appearance in AppDelegate for convenience, global UI consistency, and to support light and dark mode changes.
I do not set the navbar's color anywhere and after calling DSMManager.login() my app's navbar turns white and gives a docusign-blue background when scrolled.
I am seeing this same behavior, but I am not calling DSMManager.login(), only the following set up code is changing the nav bar appearance:
var configurations = DSMManager.defaultConfigurations() configurations[DSM_SETUP_POWERED_BY_DOCUSIGN_ENABLED] = DSM_SETUP_FALSE_VALUE configurations[DSM_SETUP_ONLINE_SIGNING_DISABLE_NATIVE_COMPONENTS] = DSM_SETUP_TRUE_VALUE DSMManager.setup(withConfiguration: configurations)
My question is-- why does this change the nav bar appearance at all? Regardless of where we update the nav bar appearance, I expect a third-party SDK to leave that alone until the point any actual UI code is invoked. If that is part of the default configuration, then it should be disabled by default.
Hello Thanks for the feedback, we have reopened this issue to investigate the issue of changing the navigation bar color even if no UI was presented. Will investigate into this issue and try to see if/when we can address this concern. For now as recommended before please use the UIViewController delegate to update the navigation bar as this will ensure a consistent behavior, there can always be a (Base)UIViewController that all UIViewController inherit from where all of the mentioned changes can be handled easily without code duplication.
Any movement on this?
Hello @keenan-chiasson we are trying to get this in for the next release (Planned end of this month) if not will try to have a quick follow up with a dot release for this one.
It's not completely fixed. If I do on the first launch
var configurations = DSMManager.defaultConfigurations()
configurations[DSM_SETUP_DISABLE_APPEARANCE] = DSM_SETUP_TRUE_VALUE
DSMManager.setup(withConfiguration: configurations)
then it still changes the color of navbar. HOWEWER, if I do:
DSMManager.setConfigurationValue(DSM_SETUP_TRUE_VALUE, key: DSM_SETUP_DISABLE_APPEARANCE)
var configurations = DSMManager.defaultConfigurations()
configurations[DSM_SETUP_DISABLE_APPEARANCE] = DSM_SETUP_TRUE_VALUE
DSMManager.setup(withConfiguration: configurations)
it works
@mmohareb
Hi Am using Docusign V 2.11. In my application Am setting my NavigationBar theme in AppDelegate
didfinsihLaunching
method. And Am calling the method,DSMManager.login()
in home page. After this method called, if I try to presenting any viewController withviewController.modalPresentationStyle = .fullScreen
and come back to previous page by dismissing it, my NavigationBar color changed to white color.For reference you can see the following test code snippets.
Step 1: Setting NavigationBar color to red.
Step 2: Pushing FirstViewController and Navigate back and Presenting SecondViewController and dismissing. Observing the NvigationBar color and it is in Red.
Step3: Calling
DSMManager.login()
Step 4: Repeat Step 2. Now we can see that the NavigationBar color changed to white.
Sample App URL: https://github.com/JacobVnu/DocuSign-Demo