Skip to content

Commit

Permalink
fix(ios): disable default animation while setting backgroundImage (#1…
Browse files Browse the repository at this point in the history
…2138)

Fixes TIMOB-28150
  • Loading branch information
build committed Sep 28, 2020
1 parent 8be0acc commit de88803
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,11 @@ - (void)setBackgroundImage_:(id)image
if (backgroundRepeat) {
[self renderRepeatedBackground:bgImage];
} else {
// To fix TIMOB-28150
[CATransaction begin];
[CATransaction setDisableActions:YES];
[self backgroundImageLayer].contents = (id)bgImage.CGImage;
[CATransaction commit];
if (bgImage != nil) {
[self backgroundImageLayer].contentsScale = [bgImage scale];
[self backgroundImageLayer].contentsCenter = TiDimensionLayerContentCenter(topCap, leftCap, topCap, leftCap, [bgImage size]);
Expand Down

0 comments on commit de88803

Please sign in to comment.