You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TabBarBackground.ios.tsx 697B

12345678910111213141516171819202122
  1. import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
  2. import { BlurView } from 'expo-blur';
  3. import { StyleSheet } from 'react-native';
  4. import { useSafeAreaInsets } from 'react-native-safe-area-context';
  5. export default function BlurTabBarBackground() {
  6. return (
  7. <BlurView
  8. // System chrome material automatically adapts to the system's theme
  9. // and matches the native tab bar appearance on iOS.
  10. tint="systemChromeMaterial"
  11. intensity={100}
  12. style={StyleSheet.absoluteFill}
  13. />
  14. );
  15. }
  16. export function useBottomTabOverflow() {
  17. const tabHeight = useBottomTabBarHeight();
  18. const { bottom } = useSafeAreaInsets();
  19. return tabHeight - bottom;
  20. }