mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove unwanted animations
Summary: Changelog: [internal] # Problem Assigning `CALayer.contents` implicitly animates the difference. As we keep `UIView` in recycle pool between usages, they keep their previous state. This was causing animation of border when the views were being reused. # Solution Wrapping application of mutations in `CATTransaction`. Reviewed By: shergin Differential Revision: D20442045 fbshipit-source-id: 214d6c422f23f399dec46b5bf1a38a7b64758160
This commit is contained in:
committed by
Facebook GitHub Bot
parent
66e7a4c1aa
commit
c774cb8ec5
@@ -135,6 +135,8 @@ static void RNPerformMountInstructions(
|
||||
{
|
||||
SystraceSection s("RNPerformMountInstructions");
|
||||
|
||||
[CATransaction begin];
|
||||
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
|
||||
for (auto const &mutation : mutations) {
|
||||
switch (mutation.type) {
|
||||
case ShadowViewMutation::Create: {
|
||||
@@ -189,6 +191,7 @@ static void RNPerformMountInstructions(
|
||||
}
|
||||
}
|
||||
}
|
||||
[CATransaction commit];
|
||||
}
|
||||
|
||||
@implementation RCTMountingManager {
|
||||
|
||||
Reference in New Issue
Block a user