What is the iPhone's default keyboard animation rate?

前端 未结 7 1857
萌比男神i
萌比男神i 2020-12-13 13:21

A while ago I remember seeing a constant of some kind that defined the animation rate of the Keyboard on the iPhone and I can not for the life of me remember where I saw it.

相关标签:
7条回答
  • 2020-12-13 13:56

    UIKeyboardAnimationDurationUserInfoKey now is a NSNumber object, that makes the code shorter.

    - (void)keyboardWillShowNotification:(NSNotification *)notification
    {
        NSDictionary *info = [notification userInfo];
        NSNumber *number = [info objectForKey:UIKeyboardAnimationDurationUserInfoKey];
        double duration = [number doubleValue];
    } 
    
    0 讨论(0)
提交回复
热议问题