Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:12:38+00:00 2026-06-13T06:12:38+00:00

I have set a inputAccessoryView as Referencing Outlet of the XIB’s file View which

  • 0

I have set a inputAccessoryView as Referencing Outlet of the XIB’s file View which has the buttons for an optional keyboard. That makes the View be shown when the Standard Keyboard is shown and be hidden when the Standard Keyboard is hidden.

It is also necessary to hide the optional keyboard when it gets a tap in its middle zone. This makes it be hidden while the Standard Keyboard is still showing. To do this, I also set another Property as Referencing Outlet of the same XIB’s file View.

I’m hiding the optional keyboard setting its frame’s origin.y to a high number:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.30f];
viewOptionalKeyboard.frame = CGRectMake(viewOptionalKeyboard.frame.origin.x, 1200, viewOptionalKeyboard.frame.size.width, viewOptionalKeyboard.frame.size.height);
[UIView commitAnimations];
[UIView setAnimationDuration:0];

This makes the optional keyboard be hidden, but the animation goes on top of the standard keyboard and not behind. You can see the auxiliar keyboard go all over the Window from up to down until it gets hidden.

Is there a way to hide it “behind” the Standard Keyboard so it’s hiding process looks better?

I edited this question because the hiding is working well now with Chris’s answer that suggested changing the size of the View.

Now the problem is about showing it again: when I tap a button, the view should be shown again with the same size. In the button tap event I added this code:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.30f];
viewOptionalKeyboard.frame = CGRectMake(viewOptionalKeyboard.frame.origin.x, 500, viewOptionalKeyboard.frame.size.width, 74);
[UIView commitAnimations];
[UIView setAnimationDuration:0];

This is to set the optional keyboard its original size and its original y position. It gets its original position, but there are 2 things that makes it wrong:

1) It is shown over/on top the Standard Keyboard, so we return to the hiding problem, but now when showing. Again, you can see the optional keyboard come all over the window from downwards until it gets its original position.

2) The buttons which belong to the main View that contains the optional keyboard come short sized as if they had been crushed.

Which is the best way to present the keyboard again avoiding this problems?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:12:39+00:00Added an answer on June 13, 2026 at 6:12 am

    Why don’t you reduce the height of the view at the same time that you move the y point?

    //For ease of reading    
    CGRect frame = viewOptionalKeyboard.frame;
    
    float x = frame.origin.x;
    float y = frame.origin.y + frame.size.height;
    
    viewOptionalKeyboard.frame = CGRectMake(x, y, frame.size.width, 0);
    

    You just need to make sure that the subviews have a flexible height auto resizing mask.

    Edit: Now that the question has changed to require the view to hide/show, the answer has changed too

    You’ll need an ivar or property to keep track of the original frame height:

    @property (nonatomic, assign) float originalHeight;
    

    And then in your method for showing/hiding, you can check whether the viewOptionalKeyboard frame is visible, and act accordingly:

    CGRect frame = viewOptionalKeyboard.frame;
    
    BOOL isVisible = frame.size.height!=0;
    
    //Only need to set once
    if (!originalHeight && isVisible){
        self.originalHeight = frame.size.height;
    }
    
    frame.origin.y += (isVisible) ? originalHeight : -originalHeight;
    frame.size.height = (isVisible) ? 0 : originalHeight;
    
    viewOptionalKeyboardFrame.frame = frame;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have set of flat files (114 files) each file is named with database
I have set up an app that is registered for remote notifications. - (void)application:(UIApplication*)application
I have set onItemClicklistener on my custom list view but onItemClicklistener not working I
I have set up a site that is correctly using basic CRUD functionality succesfully.
I have set up a UITableView with 3 sections that pulls from 3 NSArrays
I have set up a macro for Smarty in Komodo Edit which adds a
I have set up a little snippet that will take an autoresponder code for
I have set of classes which inherit from a single super class: Super |
I have set up the spellchecker for the example installation configuration that comes with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.