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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:28:50+00:00 2026-05-27T05:28:50+00:00

I’ve got a banner that I need to display below a tab bar within

  • 0

I’ve got a banner that I need to display below a tab bar within a tab bar controller. Getting it to display isn’t the hard part, I have that solved already, however it seems somehow that the method I am using seems to be putting it outside the normal area for input to be received.

Basically, I am using this banner as an advertisement, but I do not wish for it to cover the tab bar.

Here’s the code I am using to create the banner below the tab bar:

    const float footerHeight = 34.5;
    const float statusBarHeight = 20.f;
    const float viewHeight = 480 - statusBarHeight - bannerHeight - footerHeight;
    const float viewY = 0 + statusBarHeight + bannerHeight;

    UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, viewHeight, 320, footerHeight)];
    [footerView setContentMode:UIViewContentModeScaleToFill];
    [footerView addSubview:footerButton];

    [self.tabBarController.view addSubview:footerView];
    [footerView release];

    self.tabBarController.view.frame = CGRectMake(0, viewY, 320, viewHeight);

just for reference in some of the variables there is also a header above the top of the view as well. footerButton is a UIButton that I have created and hooked up in IB.

  • 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-27T05:28:51+00:00Added an answer on May 27, 2026 at 5:28 am

    I ultimately managed to work around this issue by putting a UITapGestureRecognizer on the root UIWindow object and then manually doing the rect cheecks to see if it is within the normal, smaller bounds of the tabBarController and forwarded the input to my footer bar otherwise

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
    {
        CGPoint touchPoint = [touch locationInView:self.window];
        if ( touchPoint.y > 57 && touchPoint.y < 446 )
        {
            return NO;
        }
        return YES;
    }
    
    -(IBAction) handleTap:(UIGestureRecognizer*)sender
    {
        if ( sender.state == UIGestureRecognizerStateEnded )
        {
            //handle
            CGPoint tapPoint = [sender locationOfTouch:0 inView:self.window];
            if ( tapPoint.y >= 446 )
            {
                [footerButton clickedAd];
            }
            NSLog(@"(%f,%f)", tapPoint.x, tapPoint.y );
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
In my XML file chapters tag has more chapter tag.i need to display chapters
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but
i want to parse a xhtml file and display in UITableView. what is 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.