Today I upgraded to Xamarin.iOS 8.6.0.51 and switched to a new one Unified API.
Now I want to get the keyboard size (this code worked before):
var val = new NSValue (notification.UserInfo.ValueForKey (UIKeyboard.FrameBeginUserInfoKey).Handle);
RectangleF keyboardSize = val.RectangleFValue;
Using the migration tool is RectangleFconverted to CGRect, but the errors that I get here are
Error CS1540: Unable to access protected member of Foundation.NSValue.NSValue(System.IntPtr)' via a qualifier of type
Foundation.NSValue. The qualifier must be of type `MyApp.SomeViewController 'or derived from it (CS1540)
and
Error CS0122: `Foundation.NSValue.NSValue (System.IntPtr) 'is unavailable due to its protection level (CS0122)
? new NSValue(...), RectangleFValue , / .
Edit:
jonathanpeppers :
NSValue keyboardFrameBegin = (NSValue)notification.UserInfo.ValueForKey (UIKeyboard.FrameBeginUserInfoKey);
CGRect keyboardSize = keyboardFrameBegin.CGRectValue;
, , API, .