Convert NSNotification.userInfo[UIKeyboardAnimationCurveUserInfoKey] to Enum

前端 未结 4 2105
失恋的感觉
失恋的感觉 2021-02-14 20:20

Using NSNumber from NSNotification.userInfo[UIKeyboardAnimationCurveUserInfoKey]

In Objective C I would do the following

 [UIView animateWithDuration:1.0         


        
4条回答
  •  执念已碎
    2021-02-14 20:50

    In Beta-5

    UIViewAnimationOptions.fromRaw(
        UInt(
            ( p.userInfo[ UIKeyboardAnimationCurveUserInfoKey ] as NSNumber ).unsignedIntValue << 16
        )
    )!
    

提交回复
热议问题