0

The warning I'm getting is: 'statusBarFrameUserInfoKey' was deprecated in iOS 13.0: Use viewWillTransitionToSize:withTransitionCoordinator: instead.

This is in IQKeyboard (found in Github) and I can't seem to figure this one out.

@objc internal func didChangeStatusBarFrame(_ notification : Notification?) -> Void {

    let oldStatusBarFrame = _statusBarFrame

    //  Getting keyboard animation duration
    if let newFrame =  ((notification as NSNotification?)?.userInfo?[UIApplication.statusBarFrameUserInfoKey] as? NSNumber)?.cgRectValue {

        _statusBarFrame = newFrame
    }

How do I use viewWillTransitionToSize with this, and what do I use instead of statusBarFrameUserInfoKey?

  • Does this answer your question? [How to get the status bar height in iOS 13?](https://stackoverflow.com/questions/57023899/how-to-get-the-status-bar-height-in-ios-13) – dengApro May 12 '20 at 06:05
  • This definitely worked in getting the frame size, which is 90% of the problem. So for all practical purposes, it works (at least it hasn't broken yet). – Phillip Brisco May 12 '20 at 16:29

0 Answers0