I\'m trying to use ABNewPersonViewController in my React Native app. This is how it\'s used in Objective-C:
ABNewPersonViewController *picker = [[ABNewPerson
You want to implement a bridged UI component that mounts an empty UIView and is responsible primarily for presenting your UIViewController. The simplest example of this technique is in RCTModalHostView; check out the source code.
Notably, React Native defines a category on UIView that adds a property called reactViewController which climbs the view hierarchy to find the closest UIViewController. Use this UIViewController to present your custom view controller:
- (void)didMoveToWindow
{
[super didMoveToWindow];
if (!_isPresented && self.window) {
[self.reactViewController presentViewController:_customViewController
animated:NO
completion:nil];
_isPresented = YES;
}
}