How to avoid setting UIView width and height on native side? #64
Unanswered
BraveEvidence
asked this question in
Q&A
Replies: 2 comments
-
|
Hello @PritishSawant, I'm not sure what your end goal is, but if you create a view and set its frame manually, React Native will not know about that view and the view is under your control. React Native won't change size/location of view, it will only do so on view that it managers. If you are creating your own native component, you can set gradient directly on that component in native and let React Native figure out size and position of it. I'm happy to look more in-depth into this if you provide more details and example for the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create a
fabricmodule foriOSIn my
objective-c++file while setting aUIView, I have to assign aCGRectat time ofinitofUIView. If I don't on the native side and just give it on js side the view is not visible.Following does not work
Objective-C++JSFollowing works
Objective-C++JSbut the issue is it occupies the width and height set on the
nativeside and ignoresjssideI want to use
_view = [[UIView alloc] init];without setting width and height on
nativeside but setting it onjssideTo add on more to this if I take a
UIButtonor aUILAbelinstead ofCAGradientLayerand apply constraints toUIViewthen I don't have to setCGRectMaketoUIViewAlso I don't want to pass width and height from the specs file, whatever I set from the style property should be applied
Beta Was this translation helpful? Give feedback.
All reactions