From 335f3aabe28ec8f9b96fd695edabf0d5ab0b402a Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sat, 18 Apr 2020 17:48:26 -0700 Subject: [PATCH] Migrate deprecated frameInterval to preferredFramesPerSecond (#28675) Summary: [frameInterval](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1621231-frameinterval) was deprecated in favor of [preferredFramesPerSecond](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1648421-preferredframespersecond). This migrates the deprecated call over. ## Changelog [iOS] [Fixed] - Migrate frameInterval to preferredFramesPerSecond Pull Request resolved: https://github.com/facebook/react-native/pull/28675 Test Plan: Xcode should no longer throw warnings about the deprecated call. Differential Revision: D21109710 Pulled By: shergin fbshipit-source-id: 772b9f625d3e22cd4d8cd60bddad57ff8611af54 --- Libraries/Image/RCTUIImageViewAnimated.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Image/RCTUIImageViewAnimated.m b/Libraries/Image/RCTUIImageViewAnimated.m index 21f1a065b316fb..979b9aff3a4336 100644 --- a/Libraries/Image/RCTUIImageViewAnimated.m +++ b/Libraries/Image/RCTUIImageViewAnimated.m @@ -183,7 +183,7 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink // TODO: `displayLink.frameInterval` is not available on UIKitForMac NSTimeInterval duration = displayLink.duration; #else - NSTimeInterval duration = displayLink.duration * displayLink.frameInterval; + NSTimeInterval duration = displayLink.duration * displayLink.preferredFramesPerSecond; #endif NSUInteger totalFrameCount = self.totalFrameCount; NSUInteger currentFrameIndex = self.currentFrameIndex;