keyboardwillshownotification updates

Asked on 06/16/2025

@wwdc25

1 search

In the session titled "What’s new in UIKit" at WWDC 2025, there is a discussion about handling keyboard notifications, specifically the keyboardWillShowNotification. The session introduces a new approach where UIKit in iOS 26 represents each notification as a dedicated notification sender message type. This provides a strongly typed value for registering observers and retrieving event details, which simplifies the process of adjusting layouts when the keyboard appears. You can register for the keyboardWillShowNotification type and use the animation duration and keyboard frame directly from the message, eliminating the need for user info lookups or manual casting.

For more details, you can refer to the session What’s new in UIKit (20:51).