Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ + (void)supportLegacyViewManagerWithName:(NSString *)componentName

#pragma mark - RCTComponentViewProtocol

// The legacy (Paper) view must fill the whole component view, as it did in Paper.
// Its children are laid out by Yoga relative to the outer frame (padding already applied),
// so placing the paper view at the content frame applies the padding twice.
- (void)setContentView:(UIView *)contentView
{
[super setContentView:contentView];
contentView.frame = self.bounds;
}

- (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
oldLayoutMetrics:(const LayoutMetrics &)oldLayoutMetrics
{
[super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics];
self.contentView.frame = self.bounds;
}

- (void)prepareForRecycle
{
_adapter = nil;
Expand Down