wix-incubator / react-native-controllers

Native IOS Navigation for React Native (navbar, tabs, drawer)
MIT License
611 stars 82 forks source link

Set a new root controller for a UINavigationController #12

Closed Jpoliachik closed 8 years ago

Jpoliachik commented 8 years ago

Put together a quick solution for this.

    Controllers.NavigationControllerIOS("movies").setRootController({
      title: "Other Navigation Root",
      component: 'NewNavigationRoot',
      animated: true,
    });

My use case only allows resetting the Navigation stack to a single view controller. Do you think we should support setting multiple controllers?

talkol commented 8 years ago

Looks great and it's an important feature. I'll merge it right now and resolve the conflicts. The only thing I think I'll change is the name of the function. I'm trying to keep the JS api less-iOS-ish, something like JS navigator's resetTo might be more clear to people who don't come from iOS background.

Jpoliachik commented 8 years ago

Perfect, sounds good to me. Thanks!