CADisplayLink having this method makes sense, but I'm curious why UIScreen would also have it.
1 Answers
Documentation says that the display link provided by the screen is tied to that screen. However, looking at the official documentation, there is no apparent relation to any screens; the display link is added to a runloop and that's it.
Digging deeper in the private headers, there is a display
property, of type CADisplay
, which is also found for UIScreen
. So it seems, that indeed, you can create display links specific to screens. Normally on iOS and tvOS, there is only one screen, but that is not always the case (such as connecting a monitor to an iOS device). If your app supports external monitors, and you find the need to use a display link, you should use the -[UIScreen displayLinkWithTarget:selector:]
method.
Consider opening a bug report with Apple with a documentation enhancement request to clarify the above behavior.

- 56,823
- 9
- 150
- 195
-
1The comment above the method in `CADisplayLink.h` does specify that it creates a new display link object "for the main display" which is the display for `[UIScreen mainScreen]`. Apple likes putting useful information in the header files and leaving it out of the documentation for some reason. – dan Jan 10 '17 at 21:59