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

STDSChallengeResponseViewController not respecting preferredStatusBarStyle setting. #1301

Closed
adammcarter opened this issue Aug 14, 2019 · 2 comments

Comments

@adammcarter
Copy link

Summary

When presenting a STDSChallengeResponseViewController, the status bar colour is not changing to the preferredStatusBarStyle setting. i.e. when set to lightContent it shows a dark status bar.

Code to reproduce

let handler = STPPaymentHandler.shared()
handler.threeDSCustomizationSettings = STPThreeDSCustomizationSettings.default()
handler.threeDSCustomizationSettings.uiCustomization = STPThreeDSUICustomization.defaultSettings()
handler.threeDSCustomizationSettings.uiCustomization.preferredStatusBarStyle = .lightContent

iOS version

iOS 12.4 (16G73)

Installation method

Carthage

SDK version

16.0.6

Other information

@yuki-stripe
Copy link
Collaborator

Hi @adamcarter93,

From my testing, it looks like the view controller's preferredStatusBarStyle is set to the expected value. However, it also looks like the value is ignored, and the status bar text color is black or white depending on the navigation bar style. This is with setting UIViewControllerBasedStatusBarAppearance to YES in Info.plist.

See https://stackoverflow.com/questions/19022210/preferredstatusbarstyle-isnt-called/19513714#19513714

In short, does setting barStyle = .black work for you? Setting barTintColor might let you still control the actual color of the navigation bar, I'm not sure.

@yuki-stripe
Copy link
Collaborator

I've removed preferredStatusBarStyle since it doesn't actually do anything in our case (because our UIViewControllers are in a UINavigationController). Instead, set the barStyle to .black to set the statusBarStyle to .lightContent.

Check out the summary here #1308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants