Sorry, I posted my reply a little too quickly.
The compiler was confused on this specific line:
progressLayer.frame.size.width = (progressLayer.superlayer?.frame.width ?? .zero) * progress
Which was in a function called from the weak callback mentioned above -
The reason was because it did't want to use this optional value: 'progressLayer.superlayer?.frame.width'.
And for the record, this error appeared in Xcode 13, but Xcode 14 had no issue compiling with this line.
Topic:
Programming Languages
SubTopic:
Swift
Tags: