简体   繁体   中英

React-Native : Orientation becomes locked on mount of signature component

I am using react-native-signature-capture for sign purpose.

<RNSignatureCapture
    onSaveEvent={(result) => this.onSignatureSave(result)}
    saveImageFileInExtStorage={false}
    showNativeButtons={false}
    viewMode={this.state.landscapeMode ? "landscape" : "portrait"}
/>

ViewMode determines the orientation of the screen. But the problem is after first render of the RNSignatureCapture total app gets locked to the same orientation as given in ViewMode . The only possible way to get rid of it is deleting the app.

Is there any way for auto orientation according to device movement once the RNSignatureCapture is unmounted?

Thank You.

如果未提供ViewMode道具,那么app将无法锁定到特定方向。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM