IPhone SDK: API to figure out the keyboard height

Is there an API to figure out the height of the keyboard? In one of the samples it was hardcoded to 150. Since the height is not the same in potrait and landscape mode i was wondering if there was a programmatic way to do this instead of hardcoding it in my app.
Thanks.
-TRS

This changed (but isn't well documented) now.
NOW you need something like:
CGRect keyboardRect;
CGPoint keyboardBegin;
CGPoint keyboardEnd;
\[\[\[notification userInfo\] objectForKey:UIKeyboardBoundsUserInfoKey\] getValue:&keyboardRect\];
\[\[\[notification userInfo\] objectForKey:UIKeyboardCenterBeginUserInfoKey\] getValue:&keyboardBegin\];
\[\[\[notification userInfo\] objectForKey:UIKeyboardCenterEndUserInfoKey\] getValue:&keyboardEnd\];
Message was edited by: RainPacket (because formatting code on these forums is a pain. We need a documented code-block-marker!)

Similar Messages

  • IPhone SDK: How can I disable the keyboard on a UITextField

    I would like to disable to keyboard for a UITextField. When someone touches the textfield, I would like them to be able to manipulate the cursor inside the field but I do not want a keyboard to appear.
    In other words, simply unchecking the enable option in IB is not going to work. The field needs to be enabled but I would like the keyboard to stay hidden.
    Any ideas?

    Check UITextFieldDelegate textFieldShouldBeginEditing. Return NO and see what happens. I'm not sure if that will fix it though.

  • My mini died. bought one used from a friend... all of my songs and books are on my iPhone, and I cant figure out how to get them onto this new computer. this is frustrating. the things i really want are purchases I've made from itunes store... help

    My mini died. bought one used from a friend... all of my songs and books are on my iPhone, and I cant figure out how to get them onto this new computer. this is frustrating. the things i really want are purchases I've made from itunes store... help
    !!!!!

    Hey kevyg3,
    I was able to find an article that I believe will help you move your iTunes purchases from your iPhone over to your new computer:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    Hope this helps,
    David

  • My iphone got stolen. how do i figure out the emei number?

    my iphone got stolen. how do i figure out the emei number?

    Here is what you should do:
    http://support.apple.com/kb/HT5668
    And here is how to report the theft:
    http://support.apple.com/kb/HT2526

  • If my iPhone was stolen and wiped clean can I figure out the exact time it was wiped and the last GPS location before it was wiped?

    If my iPhone was stolen and wiped clean can I figure out the exact time it was wiped and the last GPS location before it was wiped?

    Sorry, no.

  • HT204053 Help me figure out the restrictions passcode

    Help me figure out the restrictions passcode i need to get on to restrictions

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device
    1. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. iOS- Understanding passcodes
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. How to Recover Forgotten iPhone Restrictions Passcode | The iPhone and iPad
    6. Restoring iPod touch after forgotten passcode
    7. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    Restrictions Passcode Help
    1. How to Recover Forgotten iPhone, iPad Restrictions Passcode

  • Since updating my Iphone 4 I cannot figure out how to delete old messages.  There is no edit button.  Can anyone help?

    Since updating my Iphone 4 I cannot figure out how to delete old messages.  There is no edit button.  Can anyone help?

    By "sending" do you mean sending email?
    If so, what app are you using to take the photos on your iPhone 5? Or are the photos from a different source (saved to your Camera Roll from somewhere else, like a web page or Messages)?
    My guess is that Mail gives you the option to send different file sizes when it detects you are trying to Mail a really large photo file. The size of photos on the iPhone 5 is really big and some email providers may stop your mail from being delivered if attachments are too large. Thus, Mail tries to help you by offering to resize the photo.
    I suspect that if you are sending smaller files, Mail does not bother giving you options to save a smaller version. In fact, I have seen this behavior. So, if the photo is already "small enough", it gets sent as-is.
    To my  knowledge, there is no global iOS setting for this. Some apps may have different rules, of course.

  • I have a mac book pro with Windows for Mac, I have really been struggling to figure out a keyboard shortcut to switch between 2 excel files can someone suggest a solution please ?

    I have a mac book pro with Windows for Mac, I have really been struggling to figure out a keyboard shortcut to switch between 2 excel files can someone suggest a solution please ?

    someonehelpmaddy wrote:
    My Mac knows that it is connected to the montior...
    Open your Displays system preferences.  Is there an Arrangement tab and does it show two screens?  If no Arrangement tab then your mac does not know it has two screens.  Maybe smc and pram reset will shake it free and maybe not.  Maybe there's something wrong with the connection.  Thunderbolt plugs are similar to mini-displayport plugs so make sure the plug is pushed firmly in so that essentially all the metal part disappears inside the socket.  The plugs can be a little tricky in that you need to make sure the plug is fully seated in their socket.
    If you do see two screens in the Arrangement tab then click Detect Displays and Gather Windows to get the Displays preferences of the other monitor on to your main monitor.  Check the resolution and if there is a refresh rate check that as well.

  • Figuring out the mp3/wav-tempo on the fly

    Hi all,
    I'd like to know is it possible to create a flex-application which would take a mp3- or wav-song as an input and figure out the song's tempo?
    I know there are some other programs which can do this but I would need to do it inside the Flex-application because I have to add a lot of different kind of behaviours around it.
    By "is it possible" I mean that are there any plugin's or ready functions etc available?

    Umm, I’ve worked at Apple before the iPhone and now suddenly I am at level one?!? What happened?

  • I need help figuring out the best way to convert analogue video to DV so that I can edit it.

    I have a large number of VHS and hi8 tapes that I want to convert to high quality DV.
    I have a couple of options. One is an Elgado Video capture system.
    The other is a Sony Digital Media Converter Box (DVMC-DA2).
    I have tried a few of the less important tapes using the Elgado Video Capture system. It only allows you to convert to MPEG4 or H.268. It is not very good quality, especially for archival items or items I would later wish to edit.
    I also have the Sony Digital Media Converter Box. I have heard that this is a superior option. So far, though, I have only been able to figure out how to import using an old version of iMovie HD. This makes a large imovie project file (approximately 6.18GB for a 28:30 clip vs a 348.9MB for an MPEG4 using delgado.
    On top of that to convert the file from an iMovieProject file to DV is an additional step that so far looks like will take a half an hour at best.
    Is there any way for me to import VHS/hi8 tapes using the Digital Media Converter Box to creat high quality DV files directly? If so, where can I find this info? What steps should I take and what are the settings I should use.
    I have a lot of tapes so I want to figure out the right and most efficient way to do this because I will be repeating it a bunch of times and would hate to have to start over again.
    I should also mention that I am using a Mid 2010 MacBook Pro, with OSX 10.9.1
    I'm sorry in advance if this seems like an obvious question, but I have been googling and looking at tutorials on the site and just have not found the answer. There are a lot of ads for expensive low quality services to do this converting for you, so maybe the answer I am looking for is burried in all that advertising.
    Thanks

    Thanks Biggles and Gotz. I just couldint find capture, but now I can! (It was right under my nose too).
    I'm trying it now and it appears to be working. Do you have any other recommendations for capturing from hi8 video source as far as setting go? I am using DV to capture. Are there any other settings I should pay attention to?
    There is an extra line of video noise at the bottom, but when I google it, it sounds like it won't show on most standard tvs and if I want to fix it for online, that I should mask it after the fact vs scaling up the video.

  • Is there a way to figure out the name behind an Apple ID?

    Is there a way to figure out the name behind an Apple ID?  My oganization uses an iPad as a kiosk.  Somone accessed the iPad, changed the Apple ID associated with iTunes, downloaded a game and set a password to lock up the whole iPad.  We had to completely restore the iPad in order to access it.  When I tried to upload a new app, a different Apple ID popped up, and I'm assuming it was the person who locked the iPad and downloaded the game.  I would like to figure out who owns that account, just so we can not allow that person access to the iPads anymore.
    Is there a way to do this?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Perhaps with a court order because the person committed a criminal act. Otherwise it is doubtful that Apple would violate the privacy of a client/account holder just on your word.

  • How do i print out the keyboard viewer?

    I use different languages and need to use the different special characters so am switching among different keyboard layouts frequently.  I use the (on-screen) "Keyboard Viewer", but would like to print out the "Keyboard Viewer" for each language that I frequently use.  I can't see how to do this other than with e.g. screen capture which is less than ideal.  Does anybody know where there are e.g. images of each keyboard layout (including special characters you get by hitting "shift" etc.)?

    TThis page will give you normal and shift
    How to identify keyboard localizations - Apple Support
    FFor the option and option plus shift levels, you will have to use screen capture

  • My iPhone 4S is no longer using the keyboard shortcuts

    my iPhone is no longer working with the keyboard shortcuts I have set up.. Anyone else having these problems?

    What happens when you try to sync? Do you see any error messages? Which software on the computer are you referring to, iTunes? The latest iTunes is 11.1.3. If you cannot update the phone due to lack of storage, you will need to delete some content from the phone.

  • Is there a way to dynamically figure out the FIRSTROW & LASTROW using Bulk Insert?

    I noticed most of my files follow a certain convention, so I can use Bulk Insert with this:
    FIRSTROW = 2, LASTROW = 224
    However a few files have many more records.  I'd like SQL Server to dynamically figure out the first and last rows with data, but I don't know if that's possible.  Can someone confirm?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Nope, you would need read the files from some program. Could be a CLR stored procedure if you want to do it from SQL Server. But from BULK INSERT alone, no.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this?

    I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this? I have found GearGrip's LCD harness so that I can do carry-on onto the plane...  Or maybe use a Pelican Case to do it as a "checked bag"? Or any other suggestions??! Please help!
    Thanks so much!!

    I don't recommend you send the iMac in a checked bag. Might get damaged.
    Check the airlines website for carry on guidelines.
    Or, if you have the original box that the iMac came in, if you have someone who can pick up the iMac for you, send it ahead Fed Ex and insure the package.
    Just make sure the display is covered to protect it. A blanket perhaps.
    Aloha ...

Maybe you are looking for