Skip to content

Commit

Permalink
Migrate deprecated frameInterval to preferredFramesPerSecond (#28675)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
safaiyeh authored and facebook-github-bot committed Apr 19, 2020
1 parent 7a2c685 commit 335f3aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Image/RCTUIImageViewAnimated.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 335f3aa

Please sign in to comment.