React Native: 페이드 그라디언트 효과 주기 (ios/android)
페이드 그라디언트 효과를 입혀 보기 전에 필요한 라이브러리(react-native-linear-gradient)를 설치해주세요. 흰 배경에서 점차 투명 배경색으로 페이드 그라디언트 효과를 주고 싶습니까? 고로타면, colors={['white', '#ffffff00']} 라고 입력해보세요. 또는 'rgba(255,255,255,1', 'rgba(255,255,255,0)' 이라고 줘도 됩니닷. 엥 그냥 투명배경인 transparent를 쓰면 안되나요? 네 안돼요! 이렇게 하는 이유는 transparent가 본래 BLACK의 색상을 갖고 있기 때문입니다! start={{ x: 0, y: 1 }} end={{ x: 0, y: 0 }} 옵션을 추가해주면 bottom to top으로 점차 색상이 적용됩니다. 다..
React Native Navigation TabBar 양 끝 모서리 둥글게 커스텀하기
리액트 네이티브에서 react-navigation을 사용하여 탭바를 커스텀해볼게요! tabBarOptions={{ safeAreaInsets: { bottom: 0 }, tabStyle: { backgroundColor: 'transparent' }, style: { position: 'absolute', bottom: 0, left: 0, right: 0, backgroundColor: 'rgba(255,255,255,0.9)', borderColor: '#CCD2D9', borderTopRightRadius: 20, borderTopLeftRadius: 20, borderWidth: 1, }, }} safeAreaInsets는 tabBar가 화면과의 마진이라고 생각하면 되는데요. bottom:0을 주..