How do I get the following line to compile?
UIView.setAnimationCurve(userInfo[UIKeyboardAnimationCurveUserInfoKey].integerValue)
This currently gives a compilation error:
'NSNumber' is not a subtype of 'UIViewAnimationCurve'
Why does the compiler think it userInfo[UIKeyboardAnimationCurveUserInfoKey].integerValueis NSNumberwhen it is integerValuedeclared as Int?
class NSNumber : NSValue {
var integerValue: Int { get }`?
}
I had similar problems with other types of enumerations. What is the general solution?
source
share