-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Update expo-system-ui module on iOS #15146
Conversation
Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>
packages/expo-system-ui/ios/ExpoSystemUI/ExpoSystemUIModule.swift
Outdated
Show resolved
Hide resolved
} | ||
} | ||
return color | ||
Self.getBackgroundColor() | ||
} | ||
|
||
method("setBackgroundColorAsync") { (color: Int) in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since #14988 you can use color: UIColor
and it'll be automatically converted 😊 (It's not supported for returned values yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the Info.plist definition is in numeric format anyways.
public required init(appContext: AppContext) { | ||
super.init(appContext: appContext) | ||
|
||
// TODO: Maybe read from the app manifest instead of from Info.plist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think in the future we can make the app manifest available from the app context. For now this solution seems fine.
rootView.backgroundColor = [UIColor whiteColor]; | ||
} | ||
|
||
rootView.backgroundColor = [UIColor whiteColor]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am getting a little afraid if the view will blink when app running in dark mode. but maybe expo-splash-screen will handle this well. just leaving a note here. this is still looking fine to me.
* Update expo-system-ui module on iOS * Update AppDelegate.m * Apply suggestions from code review Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com> * Update ExpoSystemUIModule.swift Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>
Why
Move the startup requirements out of the template, support setting the window background color, and only set the top-level view controller. Split out of #15128