keyboardWillShow in IOS8 with UIKeyboardWillShowNotification

后端 未结 2 1862
灰色年华
灰色年华 2021-01-02 18:26

I am running the same code on an IOS 7 and IOS 8 device with differing results

Given a screen with two text fields

In IOS 7 if I touch the first field keyboa

2条回答
  •  半阙折子戏
    2021-01-02 18:39

    best is to listen for keyboardWillChangeFrameNotification

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrameNotification:) name:UIKeyboardWillChangeFrameNotification object:nil];
    

提交回复
热议问题