RotateY does not work on ios
See original GitHub issueIs this a bug report?
Yes.
Have you read the Contributing Guidelines?
Yes.
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.2.1
Yarn: 0.27.5
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.1 => 0.48.1
Steps to Reproduce
- create a new react-native app
- add this to the style of a
view
component:
<View style={{transform: [{rotateY: '45deg'}]}} >
...
</View>
Expected Behavior
Correct behaviour is to rotate the view around Y axis, which is what we see in the android build. https://ibin.co/3dkJexd90tBA.jpg
Actual Behavior
it sort of scales in Y axis instead of rotating. looks like the transform
attribute in the style is not processed well.
https://ibin.co/3dkUu8yBvCE9.jpg
Reproducible Demo
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
iOS 8 css rotateY/rotateX element disappe… - Apple Community
I had a similar issue and I fixed it by adding a perspective to the container element. -webkit-perspective: 900000px;. perspective: 900000px;.
Read more >Mobile Safari not showing CSS transform rotateX and rotateY ...
This is a bug in ios Safari browser. To fix this, surround the box div with another tag. Then move the css: -webkit-perspective:...
Read more >Mobile Safari not showing CSS transform rotateX and rotateY ...
If there any issues, contact us on - htfyc dot hows dot tech # iOS :MobileSafarinotshowingCSStransformrotateXandrotateYonlyrotateZ # iOS ...
Read more >rotateY() - CSS: Cascading Style Sheets - MDN Web Docs
The rotateY() CSS function defines a transformation that rotates an element ... the composition of 3D rotations is usually not commutative.
Read more >CSS transform:rotate iPhone problems
Hello all. I'm having a problem with CSS transform: rotate, specifically on iPhone/touch devices. I've created buttons that rotate on hover, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thg303 As a work-around, you can specify a perspective value (before the rotation) to get a similar looking result on both Android and iOS. Note that the perspective needs to be applied prior to the rotation to get the correct results. You can play around with the values, but likely somewhere between 500 and 1000 will give you the effect you’re looking for.
Original code:
New code:
yes, and what is more, you must place {perspective: 500} before your transform style, otherwise it still not work, i try it hard…