You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add the prop nativeID to a view like follows: <View nativeID="viewId">...</View>
And then use that id to locate the view in my native android and iOS code so I could apply some native method on it. If it is then an example would be appreciated.
I did find the following method on the IOS:
/**
* Finds a view that is tagged with nativeID as its nativeID prop
* with the associated rootTag root tag view hierarchy. Returns the
* view if found, nil otherwise.
*
* @param nativeID the id reference to native component relative to root view.
* @param rootTag the react tag of root view hierarchy from which to find the view.
*/
- (UIView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag;
But the implementation seems to append nativeId with root tag (as key ) and then get it from Map so I am not sure the description of the rootTag param is correct.
In case I done have the root tag how would I start get the rootView?
The text was updated successfully, but these errors were encountered:
MikePendo
changed the title
How to get view related to nattiveId
How to get view related to nativeId
Dec 1, 2021
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to add the prop nativeID to a view like follows:
<View nativeID="viewId">...</View>
And then use that id to locate the view in my native android and iOS code so I could apply some native method on it. If it is then an example would be appreciated.
I did find the following method on the IOS:
But the implementation seems to append nativeId with root tag (as key ) and then get it from Map so I am not sure the description of the rootTag param is correct.
In case I done have the root tag how would I start get the rootView?
The text was updated successfully, but these errors were encountered: