grahammendick / navigation

Scene-Based Navigation for React and React Native
https://grahammendick.github.io/navigation/
Apache License 2.0
571 stars 40 forks source link

TopTabs for Android & iOS #730

Closed salisuabubakar closed 11 months ago

salisuabubakar commented 11 months ago

Hi, IS there a way to create TopTabs for both android and iOS. Thanks

grahammendick commented 11 months ago

Hi, you can have primary top tabs on Android but not on iOS. The UITabBarController from UIKit doesn’t support top tabs. But you can have non-primary top tabs on iOS if you want?

<TabBar primary={Platform.OS === 'android'}  bottomTabs={false}>
salisuabubakar commented 11 months ago

Hi, its working but i would like to know on iOS is it the same as segmented control ?

grahammendick commented 11 months ago

Yea, it's the segmented control

salisuabubakar commented 11 months ago

I saw this and wanted to share. Is it the same ? When i change it non primary the segmented controls is on top of the navigationbar.

Anatomy-2
grahammendick commented 11 months ago

Yea, it's the same. You need to wrap it in a SafeAreaView like in the notifications scene of the twitter sample

salisuabubakar commented 11 months ago

Yeah its cool. Just tried it. Thanks