'React Native' 카테고리의 글 목록 (2 Page)

https://stackoverflow.com/questions/16049335/cocoapods-pod-install-permission-denied

 

cocoaPods pod install Permission denied

This is the short version: When I run pod install in an Xcode project I get [!] Pod::Executable pull error: cannot open .git/FETCH_HEAD: Permission denied If I run sudo pod install I ...

stackoverflow.com

 

위 포스팅에서 아래 글대로 해서 해결했다.

 

유저에게 CocoaPods 권한을 준다.

$ sudo chown -R <유저명> ~/Library/Caches/CocoaPods

Android에서는 elevation 속성, iOS에서는 shadowColor, shadowOffset, shadowRadius, shadowOpacity를 사용해 그림자를 구현한다.

Android에서는 elevation 속성으로 숫자값으로 그림자를 표현하는데 그 이외에는 표현이 불가능하다.

다양한 그림자를 표현하기 위해서는 오브젝트를 사용해 그림자를 표현한다.

 

아래 링크 참고

 

https://blog.pumpkin-raccoon.com/121

 

react native 에서 그림자 구현하기 (w/ react-native-shadow)

웹 개발이나 React 개발만 하시던 분들이 앱을 개발하기 위해 React Native를 시작하는 경우가 많습니다. React와 문법이 비슷해서 쉽게 시작할 수 있지만, 또 가끔가다 웹 개발과 전혀 다른 부분을 마

blog.pumpkin-raccoon.com

 

폰으로 Expo Go 이용시에는 옵션창을 열려면 세손가락으로 일정 시간 누르고 있으면 옵션창이 열린다.

하지만 에뮬레이터로 테스트 할 때 Expo Go에서 옵션창을 열려면

iOS는 Command + D / Android는 Control + M으로 열 수 있다

 

그리고 마찬가지로 에뮬레이터에서 Expo Go 두 손가락 제스처를 실행하기 위해서는 Option(Alt)키를 사용하면 된다

React Native는 React 문법을 활용하여 네이티브 앱을 만들 수 있게 해준다.

React를 알고 있으면 React Native 공부가 수월하지만, 차이점을 기억해둘 필요가 있어 메모를 해둔다.

 

React Native는 React와 달리 웹이 아니라 앱이기 때문에, 화면을 구성할 때 HTML태그와 같은 방식으로 작성하지 않는다.

기본적으로 리액트 네이티브에서 제공해주는 컴포넌트를 사용하여 화면을 구성한다.

 

import { Text, View } from "react-native";

export default function App() {
    return (
        <View>
            <Text>텍스트입니다</Text>
        </View>
    )
}

 

 

- React native에서 스타일을 작성할 때에는 StyleSheet.create를 통해 스타일을 작성하고 사용한다.

- display 속성에 flex를 제외한 나머지 레이아웃 스타일은 지원하지 않는다.

-안드로이드에서는 지원하고 아이폰에서는 지원하지 않는 것과 같은 스타일이 있어 둘이 공통적으로 작동할 수 있게끔 스타일을 작성해야 한다.

- 스크롤이 자동으로 구현되지 않고, 스크롤 전용 컴포넌트를 통해 명시적으로 구현해야 한다. (ScrollView, FlatList)

 

 

React Native Documantation

https://reactnative.dev/docs/components-and-apis

 

Core Components and APIs · React Native

React Native provides a number of built-in Core Components ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen). If you're not sure where to get started, take a look at the following cat

reactnative.dev

 

Expo Documentation

https://docs.expo.dev/

 

Expo Documentation

Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.

docs.expo.dev

 

+ Recent posts