I have the following code which worked on IOS 10, but now it doesn't work anymore when running on IOS 11 beta.
if let userInfo = notification.userInfo {
if let keyboardSize = (userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue {
print(keyboardSize)
}
}
This is what I get when I print the size:
(0.0, 0.0, 0.0, 0.0)
(0.0, 736.0, 414.0, 0.0)
Anyone knows why this has stopped working ? Or if I have any other alternatives to get the keyboard size ?