airbnb / native-navigation

Native navigation library for React Native applications
http://airbnb.io/native-navigation/
MIT License
3.13k stars 177 forks source link

Translucent ios nav bar #119

Open savelichalex opened 7 years ago

savelichalex commented 7 years ago

Looks like translucent not work correctly on iOS, I'm change in ReactNavigationImplementation.swift method reconcileScreenConfig part with translucent config to:

if let translucent = boolForKey("translucent", next) {
        if (translucent == true) {
            navBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
            navBar.shadowImage = UIImage()
            navController.view.backgroundColor = UIColor.clear
        }
        navBar.isTranslucent = translucent
}

but I really don't know how disable it when next screen will be with translucent false

benkraus commented 7 years ago

What is it you are wanting it to do? Setting the background image and shadow image ends up making the nav bar entirely transparent there. Is that what you are going for?

savelichalex commented 7 years ago

@benkraus yeah, you are right. Is it not what "translucent" mean?)