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:
Родитель
66e7a4c1aa
Коммит
c774cb8ec5
|
@ -135,6 +135,8 @@ static void RNPerformMountInstructions(
|
||||||
{
|
{
|
||||||
SystraceSection s("RNPerformMountInstructions");
|
SystraceSection s("RNPerformMountInstructions");
|
||||||
|
|
||||||
|
[CATransaction begin];
|
||||||
|
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
|
||||||
for (auto const &mutation : mutations) {
|
for (auto const &mutation : mutations) {
|
||||||
switch (mutation.type) {
|
switch (mutation.type) {
|
||||||
case ShadowViewMutation::Create: {
|
case ShadowViewMutation::Create: {
|
||||||
|
@ -189,6 +191,7 @@ static void RNPerformMountInstructions(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[CATransaction commit];
|
||||||
}
|
}
|
||||||
|
|
||||||
@implementation RCTMountingManager {
|
@implementation RCTMountingManager {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче