반응형

 

```
const Stack = createStackNavigator();

export default function ListStack({ navigation, route }) {
// 들어갔을 때 네비게이션 없애는 함수 
// 네비게이션 내에서 이동을 0으로 하고 다른곳으로 들어갈때마다 1 추가해서 네비게이션 바를 없애는 함수 
route.state && route.state.index > 0
    ? navigation.setOptions({ tabBarVisible: false })
    : navigation.setOptions({ tabBarVisible: true });
return (
    <Stack.Navigator>
        <Stack.Screen name="내 기기" component={MyListTab}
            options={{
                title: '내 기기',
                ...Platform.select({
                    android: {
                        headerTitleStyle: {
                            fontSize: 25,
                            fontWeight: 'bold'
                        }

                    },
                    ios: {
                        headerStatusBarHeight: 50,
                        headerTitleStyle: {
                            fontSize: 25,
                            fontWeight: 'bold'

                        }
                    }

                }),
                headerTintColor: "#2699FB",
                headerTitleAlign: 'left',

            }}
        />
        <Stack.Screen name="Alsum" component={AlsumScreen}
            options={{
                title: '알숨',
                ...Platform.select({
                    android: {

                    },
                    ios: {

                    }
                }),
                headerTintColor: "#2699FB",
                headerTitleStyle: {


                },
                headerTitleAlign: 'center',
            }} />
    </Stack.Navigator>
);
```

}

반응형
복사했습니다!