-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat(iOS): Added translucent property for iOS #62
feat(iOS): Added translucent property for iOS #62
Conversation
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.
Overall looks good! Thanks for implementing this. Did you try to run it on Android? I think that it needs an empty setter with prop name translucent because without it it might fail
ios/TabViewImpl.swift
Outdated
@ViewBuilder | ||
func tabBarTranslucent(_ translucent: Bool) -> some View { | ||
self | ||
.onAppear { | ||
UITabBar.appearance().isTranslucent = translucent | ||
} | ||
.onChange(of: translucent) { newValue in | ||
UITabBar.appearance().isTranslucent = newValue | ||
} | ||
} |
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.
Looks like you are using 4 space indentation while the project is using 2 spaces, can you fix that? We probably need SwiftLint in the repo to catch this
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.
Added an empty setter in android and fixed indentation issues as well.
Thank you for suggestion @okwasniewski. Will keep these in mind in future PRs.
…-native-bottom-tabs into feat/translucent
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.
Thank you!
Part of this: #11
Summary : This PR adds the support for translucent in iOS.
Adding video for reference:
translucent={false}
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-19.at.20.16.49.mp4
translucent={true}
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-19.at.20.18.27.mp4