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

  • SEARCH
  • Home
  • 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 9241565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:23:32+00:00 2026-06-18T08:23:32+00:00

I have a search bar in my app in which I would like some

  • 0

I have a search bar in my app in which I would like some animation to occur just before the keyboard shows up when the focus is placed in the search box. Is there a delegate method I can make use of to intercept before the keyboard is shown?

I am currently running the following code to detect when the UISearchBar has been activated:

-(void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar{
    NSLog(@"Begin Editing");
    CGRect newFrame = searchBar.frame;
    newFrame.origin.y = 0;
    [UIView animateWithDuration:0.25
                      animations:^{
                          searchBar.frame = newFrame;
                          [searchBar layoutSubviews];
                      }
                      completion:^(BOOL finished){
                          NSLog(@"Done!");
                      }
     ];
}

Can I delay the showing of the keyboard in anyway? Maybe call a halt to it and then show it in the completion handler?

  • 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-18T08:23:33+00:00Added an answer on June 18, 2026 at 8:23 am

    you need to add an notification center to you code.

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
    

    then declare a method named keyboardDidShow: and add the animation code to it.

    there many options available. I guess

    name:UIKeyboardWillShowNotification
    

    is also available. just check it if its there and it should work.

    Cheers happy coding.!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The actually URL which my app uses is: http://site.com/search.php?search=iPhone but I would like it
I am creating an iPhone app which I would like to have a similar
In my app, I have a search bar which can search facebook user by
For my Grails App i use Searchable Plugin to have an nice google-like Search.
Here is the problem, I have an app with a search bar, the user
I have a search field in my Cocoa app and I'd like to add
I am using a search bar in my app and display some results below
I have implemented the search bar in my app and it´s working fine, but
I have a search bar. Entering text in it and clicking search takes you
alt text http://img216.imageshack.us/img216/2288/problem11.png As given in the picture, I have an search bar in

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.