react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

[Iphone X] ref capture cause entire screen to scale

Open mmamoyco opened this issue 5 years ago • 2 comments

bug report

We using this lib to capture card element on screen. On iphone < iphoneX devices it works just fine, but on Iphone X capture method causes strange behavior. The entire screen scales for just a sec and then all is ok.

Before calling capture mehod() Simulator Screen Shot - iPhone 11 - 2019-10-02 at 13 12 43

After calling capture method() entire screen scales for just a moment Simulator Screen Shot - iPhone 11 - 2019-10-02 at 13 12 48

Tested with ViewShot component and captureRef approaches.

Version & Platform

└── [email protected]  

Platform: IOS

Expected behavior: Screen must not jump, scale

Actual behavior: Screen scale for a sec after calling capture method.

Steps to reproduce the behavior

  1. Create view you want to capture
  2. Capture it using IphoneX.

mmamoyco avatar Oct 02 '19 10:10 mmamoyco

Can you tell us more about how you use captureRef? are you using snapshotContentContainer ? thanks

gre avatar Jan 19 '20 13:01 gre

Hi, thx for reply

I tried captureRef approach like this captureRef(this._frontSide.current, { format: 'jpg', quality: 0.8, }); _frontSide reference created with React.createRef() and attached to View component as ref property.

About snapshotContentContainer. No, im not using it

mmamoyco avatar Jan 22 '20 13:01 mmamoyco