-
[리엑트 네이티브] 레이아웃React Native 2019. 2. 4. 11:58
레이아웃을 이해하기 위한 3가지 요소 [1] flexDirection - flex를 레이아웃의 수직 수평을 결정 => 수평 : row, 수직 : column [2] JustifyContents - flexDirection에 의해 결정된 방향과 동일 => 종류 : 'flex-start', 'flex-end', 'center', 'space-between', 'space-around' [3] alignItems - flexDirection에 의형 결정된 방향과 반대 방향 => 종류 : 'flex-start', 'flex-end', 'center', 'space-between', 'space-around' 읽어도 모르겠죠?? 예시로 설명해 보겠습니다. import React from 'react'; impor..
-
[리엑트 네이티브] 스타일 변경React Native 2019. 2. 4. 11:09
[1] inline [2] style object mapping const styles = StyleSheet.create({ B_box : {width: 50, height: 50, backgroundColor: 'black'} }); import React from 'react'; import { AppRegistry, View, StyleSheet } from 'react-native'; class Example extends React.Component { render() { return ( ); } }; const styles = StyleSheet.create({ B_box : {width: 50, height: 50, backgroundColor: 'black'} }); AppRegistry..