Sunday, May 12, 2024
45
rated 0 times [  49] [ 4]  / answers: 1 / hits: 125165  / 9 Years ago, sat, march 28, 2015, 12:00:00

How do I render a shadow on a View? I've tried many combinations of shadowColor, shadowOffset, shadowOpacity, and shadowRadius, which seem to do nothing. I am sure the style is applied correctly, since other attributes I've set work.


More From » react-native

 Answers
6

It appears to be a bug in React native that shadowOpacity is set to type CGFloat instead of float according to CALayer doc. use iPhone 5 simulator before it's fixed. (CGFloat is float in older devices. )



The React Native issue which is tracking this is:



https://github.com/facebook/react-native/issues/449


[#67269] Friday, March 27, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronaldodarioc

Total Points: 441
Total Questions: 105
Total Answers: 106

Location: Christmas Island
Member since Sun, Mar 7, 2021
3 Years ago
ronaldodarioc questions
Thu, Jan 28, 21, 00:00, 3 Years ago
Sat, Nov 21, 20, 00:00, 4 Years ago
Wed, Apr 29, 20, 00:00, 4 Years ago
Fri, Mar 6, 20, 00:00, 4 Years ago
;