We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 478ce9a commit b00fa91Copy full SHA for b00fa91
Sources/AnimatedImage/BaseClass/AnimatableCGImageView.swift
@@ -2,12 +2,17 @@ public import UIKit
2
import UpdateLink
3
4
open class AnimatableCGImageView: CGImageView {
5
- var updateLink: (any UpdateLink)!
+ lazy var updateLink: (any UpdateLink) = { preconditionFailure() }()
6
7
public override init(frame: CGRect) {
8
super.init(frame: frame)
9
if #available(iOS 18.0, visionOS 2.0, *) {
10
- updateLink = UIUpdateLink(view: self)
+ // workaround: Designed for iPad doesn't have UIUpdateLink.
11
+ if ProcessInfo.processInfo.isiOSAppOnMac {
12
+ updateLink = BackportUpdateLink(view: self)
13
+ } else {
14
+ updateLink = UIUpdateLink(view: self)
15
+ }
16
} else {
17
updateLink = BackportUpdateLink(view: self)
18
}
0 commit comments