Skip to content

Commit

Permalink
Reset the autoresizing mask when the view is recycled
Browse files Browse the repository at this point in the history
Summary:
Autoresizing mask is a native property of iOS views. When a veiw is created anew, the default value is `UIViewAutoresizingNone`. Libraries might create code that update this property and we need to make sure that it is reset when the view is recycled.

This should close: facebook#42732

## Changelog:
[iOS][Changed] - Reset the autoresizing mask to `UIViewAutoresizingNone` when the view is recycled.

Differential Revision: D54263847
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 27, 2024
1 parent fadcf7b commit 698c74e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ - (void)prepareForRecycle
_eventEmitter.reset();
_isJSResponder = NO;
_removeClippedSubviews = NO;
self.autoresizingMask = UIViewAutoresizingNone;
_reactSubviews = [NSMutableArray new];
}

Expand Down

0 comments on commit 698c74e

Please sign in to comment.