Use this:
CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
For Swift, you can use:
let keyboardSize = (notification.userInfo![UIKeyboardFrameEndUserInfoKey] as! NSValue).cgRectValue.size
More Related Contents:
- Send and receive messages through NSNotificationCenter in Objective-C?
- Comparing two values and returning the greatest of the two
- Converting NSString to NSDate gives nil [duplicate]
- Determine device (iPhone, iPod Touch) with iOS
- Should IBOutlets be strong or weak under ARC?
- Proper way to exit iPhone application?
- Generate JSON string from NSDictionary in iOS
- How can I mask a UIImageView?
- iPad keyboard will not dismiss if modal ViewController presentation style is UIModalPresentationFormSheet
- UIImageView – How to get the file name of the image assigned?
- Types in Objective-C on iOS
- Send POST request using NSURLSession
- How do I make UILabel display outlined text?
- Finding IMEI number using Objective-C [duplicate]
- ViewDidAppear is not called when opening app from background
- iOS memory allocation – how much memory can be used in an application? [duplicate]
- Counting the number of lines in a UITextView, lines wrapped by frame size
- iOS blocks and strong/weak references to self
- How to change inactive icon/text color on tab bar?
- How can I create a big, red UIButton with iOS?
- Send a file as attachment in objective c
- How does cellForRowAtIndexPath work?
- Auto layout UIScrollView with subviews with dynamic heights
- Instead of push segue how to replace view controller (or remove from navigation stack)?
- Why does my programmatically created screenshot look so bad on iOS 7?
- UIBezierPath Triangle with rounded edges
- iOS 7 round framed button
- How do I get word wrap information with the new iOS 7 APIs?
- What is the difference between UIApplication.sharedApplication.delegate.window and UIApplication.sharedApplication.keyWindow?
- How do I calculate the UILabel height dynamically [duplicate]