Skip to content

Commit 335f3aa

Browse files
safaiyehfacebook-github-bot
authored andcommitted
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 <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Migrate frameInterval to preferredFramesPerSecond Pull Request resolved: #28675 Test Plan: Xcode should no longer throw warnings about the deprecated call. Differential Revision: D21109710 Pulled By: shergin fbshipit-source-id: 772b9f625d3e22cd4d8cd60bddad57ff8611af54
1 parent 7a2c685 commit 335f3aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Image/RCTUIImageViewAnimated.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink
183183
// TODO: `displayLink.frameInterval` is not available on UIKitForMac
184184
NSTimeInterval duration = displayLink.duration;
185185
#else
186-
NSTimeInterval duration = displayLink.duration * displayLink.frameInterval;
186+
NSTimeInterval duration = displayLink.duration * displayLink.preferredFramesPerSecond;
187187
#endif
188188
NSUInteger totalFrameCount = self.totalFrameCount;
189189
NSUInteger currentFrameIndex = self.currentFrameIndex;

0 commit comments

Comments
 (0)