Created
May 23, 2013 10:09
-
-
Save robc/5635076 to your computer and use it in GitHub Desktop.
Fix for the UIKeyboardBounds deprecated warnings which are present in the default Unity-iOS Project files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code as present in the source | |
CGPoint center = [[notification.userInfo objectForKey:UIKeyboardCenterEndUserInfoKey] CGPointValue]; | |
CGRect rect = [[notification.userInfo objectForKey:UIKeyboardBoundsUserInfoKey] CGRectValue]; | |
// Correct code to replace it | |
CGRect rect = [[notification.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
CGPoint center = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment