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

Forward UIViewController status bar APIs to ComposeUIViewControllerDelegate #1378

Merged
merged 7 commits into from
May 31, 2024

Conversation

elijah-semyonov
Copy link

Forward status bar related APIs to ComposeUIViewControllerDelegate

Implements enhancement requested by JetBrains/compose-multiplatform#4889

Testing

StatusBarStateExample in Demo project.

Release Notes

Features - iOS

  • preferredStatusBarStyle, preferredStatysBarAnimation and prefersStatusBarHidden are added to ComposeUIViewControllerDelegate to allow status bar appearance modification.

@elijah-semyonov elijah-semyonov self-assigned this May 29, 2024
val viewController = LocalUIViewController.current
LaunchedEffect(statusBarStyleIndex, statusBarHiddenIndex, statusBarAnimationIndex) {
UIView.animateWithDuration(0.3) {
viewController.setNeedsStatusBarAppearanceUpdate()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if we can rework code to get rid of this call when changing status bar appearance settigns.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but I guess people know exactly when they want to do it, and it's a trivial piece of code, so better not lock ourselves into some specific behavior.

@elijah-semyonov elijah-semyonov merged commit 1694668 into jb-main May 31, 2024
6 checks passed
@elijah-semyonov elijah-semyonov deleted the es/forward-status-bar-apis branch May 31, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants