RepairShopr / react-native-signature-capture

A simple modular component for react native (iOS) to capture a signature as an image
MIT License
962 stars 514 forks source link

viewMode, orientation problems #130

Open skicson opened 6 years ago

skicson commented 6 years ago

I've just started using this library in a new project. I have it working in pure portrait configuration, but I'm running into all kinds of problems when trying to present it in landscape.

First, I've noticed that the viewMode attribute only applies to Android. If set to 'landscape', it does present the screen as landscape but then the app cannot return to portrait.

Second, on iOS, if setting the title label or the buttons, those elements always appear rotated (as shown in the screenshot) After reviewing the code, this looks like by design, but it's not clear how this would ever work. I've run the app in landscape mode only, and still get the same thing.

Since no one else has reported this, I'm wondering if perhaps these problems have something to do with the latest react-navigation package or some other configuration issue.

orientation

skicson commented 6 years ago

So after spending a few hours on it, I guess the assumption is that this is always presented as landscape to the user although the device orientation is actually portrait. Then we use style transform attributes to rotate the buttons so it also looks like it's in landscape.

scrodrig commented 6 years ago

I'm having the same problem and I'm using the previous React Navigation On iOS shows like the screenshot above and Android does not show me the titleLabel at all

Do you have any updates about this?

skicson commented 6 years ago

According to the docs, titleLabel is only supported on iOS. As far as the rest - again, I think the idea is that on the iPhone, the signature should ALWAYS presented as landscape no matter what the device orientation is. In my case, I always set the view mode to portrait (so that iOS and Android work the same), and then rotate the buttons appropriately (see pic below). However, this does require that the signature image is rotated counter clockwise after capture. The iOS implementation had an undocumented attribute for this, but I ended up forking this library to add the same thing for Android.

ex3

code-by commented 6 years ago

in my project (landscape mode only) with viewMode="landscape" it looks like this https://gyazo.com/8ab92025d20d39f743bec6fbcccfcd1c how to solve this?

ben-toogood commented 6 years ago

+1

Codenaticz commented 5 years ago

in my project (landscape mode only) with viewMode="landscape" it looks like this https://gyazo.com/8ab92025d20d39f743bec6fbcccfcd1c how to solve this?

Did you solve this?

darsodango commented 4 years ago

I'm currently having the same issue too. Do you guys have some updates for this?

R4DIC4L commented 4 years ago

In my case, the iOS emulator always shows the screen in a portrait mode, even if the phone is in landscape mode. viewMode property seems to only work on android, but indeed it locks the screen (reason for me not using it).

kirandesai303 commented 3 years ago

+1

Nruyansh commented 1 year ago

Guys, do any one found a solution?