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 7011265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:06:18+00:00 2026-05-27T22:06:18+00:00

I have a Button on a UIViewController . When i click on this Button,

  • 0

I have a Button on a UIViewController. When i click on this Button, a UIToolBar gets displayed (Above the TabBarController). Now when i scroll the view down and click the Button the UIToolBar gets displayed at a different location (way above the tababar). What i want is to display the UIToolBar right above the TabBar at all instances (even when i scroll the page up or down and click the Button).

My code so far :

toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 300 , 320 , 55)];

According to this Code, i have given the X and Y cordinates of the toolBar to be 0 and 323. So even when i scroll the view up or down and click on the button, the toolbar will display at this location.

So how can i modify my code, to display it right above the TabBar at all instances. (Even when i scroll the view up or down)

  • 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-05-27T22:06:19+00:00Added an answer on May 27, 2026 at 10:06 pm

    the problem is: You are adding the toolbar on the view with the coordinate hardcoded to (0, 300 , 320 , 55). And this is with respect to the view. But not the iphone screen or window. after adding when you scroll the view, you can see that the view contents are also scrolled up.

    All you have to do is:

    UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window];
    toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 300 , 320 , 55)];
    [mainWindow addSubview:toolBar];
    [mainwindow bringSubviewToFront:toolBar];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController that I load every time I click a button: NearMe
I have a button that I'm creating in a UIViewController like so: TOLoginButton* button
I have one issue with UInavigationcontroller In my firstview i have button.If i click
We have a button that saves asynchronously using AjaxToolKit/C#/.NET. I'm getting this in my
i am using UIviewcontroller subclasses. In my main view i have 3 buttons, each
I have a UIViewController set up to display an info-button on the right in
I'd like to have a UIViewController which has an Add and a Trash button
I have one base view controller contentViewController with one button the action on button
I have a UIViewController (firstViewController) which has a button that 'segue's to another UIViewController
In my UIViewController I have a UINavigationController with a default back button. When the

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.