mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 13:25:51 +08:00
Add <Modal /> component
Summary: Create Modal component that can be used to present content modally.
This commit is contained in:
@@ -40,10 +40,10 @@
|
||||
- (UIView *)viewForReactTag:(NSNumber *)reactTag;
|
||||
|
||||
/**
|
||||
* Update the frame of a root view. This might be in response to a screen rotation
|
||||
* Update the frame of a view. This might be in response to a screen rotation
|
||||
* or some other layout event outside of the React-managed view hierarchy.
|
||||
*/
|
||||
- (void)setFrame:(CGRect)frame forRootView:(UIView *)rootView;
|
||||
- (void)setFrame:(CGRect)frame forView:(UIView *)view;
|
||||
|
||||
/**
|
||||
* Update the background color of a root view. This is usually triggered by
|
||||
|
||||
@@ -368,13 +368,11 @@ static NSDictionary *RCTViewConfigForModule(Class managerClass)
|
||||
return _viewRegistry[reactTag];
|
||||
}
|
||||
|
||||
- (void)setFrame:(CGRect)frame forRootView:(UIView *)rootView
|
||||
- (void)setFrame:(CGRect)frame forView:(UIView *)view
|
||||
{
|
||||
RCTAssertMainThread();
|
||||
|
||||
NSNumber *reactTag = rootView.reactTag;
|
||||
RCTAssert(RCTIsReactRootView(reactTag), @"Specified view %@ is not a root view", reactTag);
|
||||
|
||||
NSNumber *reactTag = view.reactTag;
|
||||
dispatch_async(_shadowQueue, ^{
|
||||
RCTShadowView *rootShadowView = _shadowViewRegistry[reactTag];
|
||||
RCTAssert(rootShadowView != nil, @"Could not locate root view with tag #%@", reactTag);
|
||||
|
||||
Reference in New Issue
Block a user