CountdownLabel
CountdownLabel copied to clipboard
Fix expression to remove type-check compiler error in Xcode 12.5
Issue
This issue is getting after Xcode 12.5 update
The issue is caused by the expression which needed to be break down into sub-expressions
Using release version : 4.0.1
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
![sub-expressions_xcode12-5](https://user-images.githubusercontent.com/67100487/117950323-44962680-b33d-11eb-9237-357981f853db.png)
Proposed solution
Replacing expression:
return {
return c * ($0 * $0 * $0 * $0 * $0 + 1.0) + b
}(t / d - 1.0)
with
return { (f: Float) in
return c * (pow(f, 5) + 1.0) + b
}(t / d - 1.0)
@hungHatto just to fix this temporarily, you can use commit in your podfile. Here is how to add the commit in your Pod file
pod 'CountdownLabel', :git => 'https://github.com/linkstreet/CountdownLabel.git'