728x90
반응형

React Native 96

React native 모달( Modal )

import { View, TouchableHighlight,TouchableOpacity,Modal } from 'react-native' // 모달 박스1 class CancelModel extends Component{ state = { modalVisible: false, }; setModalVisible(visible) { this.setState({ modalVisible: visible }); } render() { return ( { Alert.alert('Modal has been closed.'); }}> 알림 이 페이지를 벗어나면, {"\n"} 작성중인 데이터가 모두 사라집니다.{"\n"}{"\n"} 페이지를 종료 하시겠습니까? { this.setModalVisible(!this.st..

React Native 2020.02.04

React native 네비게이션 옵션을 라우트 네임에 따라 적용방법

예시) 라우트 네임에 따라서, 탭바를 보여줄지 안보여 줄지 선택 const tabbarVisible = (navigation) => { const { routes } = navigation.state; let showTabbar = true; routes.forEach((route) => { if (route.routeName === 'WriteBoard') { showTabbar = false; } }); return showTabbar; }; // Board2 탭 메뉴 뷰들 createMaterialTopTabNavigator const Board_TapView2 = createBottomTabNavigator( { 공지사항 :{ screen:Test_1, navigationOptions: ({ na..

React Native 2020.01.31

React native issue 탭 네비게이션 헤더 문제.

탭 네비게이션의 경우 헤더가 생기지 않는다. 그렇기 때문에 스텍 네비게이터로 감싼것을 탭 네비게이션의 스크린에 추가를 해준다. const Test_1 =createStackNavigator( { NotiMain: { screen: NotiMain }, WriteBoard:{ screen: WriteBoard } } ) const Test_2 = createStackNavigator( { SuggestionsBoard: { screen: SuggestionsBoard }, WriteBoard:{ screen: WriteBoard } } ) const Test_3 = createStackNavigator( { QnABoard: { screen: QnABoard }, WriteBoard:{ screen: Wr..

React Native 2020.01.29

React native Drawer 커스텀 메뉴

// 옆에 사이드에서 보여지는것 ( 드로어 네비게이터 메뉴 ) const Main_Draw_View = createDrawerNavigator( { Main_View, Intro_Main : { screen : Intro_Main }, CalenderMain:{ screen :CalenderMain }, BoardMain :{ screen: BoardMain } },{ drawerWidth: Dimensions.get("window").width * 0.5, contentComponent : SideMenu, contentOptions:{ // activeBackgroundColor:'#32C5E6' activeTintColor : '#32C5E6' } } ) contentComponent : 커스텀 할..

React Native 2020.01.28
728x90
반응형