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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:11:17+00:00 2026-06-03T07:11:17+00:00

I have created a navigation controller with a stack of view controllers. I want

  • 0

I have created a navigation controller with a stack of view controllers.

I want to add a subview at the bottom which stays static (does not move) while the user navigates between this stack of views.

Like in some apps, there is an “ads bar” at the bottom.

How can I do this?

  • 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-03T07:11:19+00:00Added an answer on June 3, 2026 at 7:11 am

    If I understand correctly, this is what you want:

    UIView below UINavigationController or below TabBar

    You can to this by creating a custom UIViewController that encloses the UINavigationController. Create a new class called “CustomViewController”, and paste the following code:

    Interface

    #import <UIKit/UIKit.h>
    
    @interface CustomViewController : UIViewController
    
    - (id)initWithViewController:(UIViewController*)viewController bottomView:(UIView*)bottomView;
    
    @end
    

    Implementation:

    #import "CustomViewController.h"
    
    @implementation CustomViewController
    
    - (id)initWithViewController:(UIViewController*)viewController bottomView:(UIView*)bottomView
    {
        self = [super init];
        if (self) {
    
            //  Set up view size for navigationController; use full bounds minus 60pt at the bottom
            CGRect navigationControllerFrame = self.view.bounds;
            navigationControllerFrame.size.height -= 60;
            viewController.view.frame = navigationControllerFrame;
    
            //  Set up view size for bottomView
            CGRect bottomViewFrame = CGRectMake(0, self.view.bounds.size.height-60, self.view.bounds.size.width, 60);
            bottomView.frame = bottomViewFrame;
    
            //  Enable autoresizing for both the navigationController and the bottomView
            viewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
            bottomView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
    
            //  Add views as subviews to the current view
            [self.view addSubview:viewController.view];
            [self.view addSubview:bottomView];
        }
        return self;
    }
    
    @end
    

    Now to use the CustomViewController:

    UIView *myBottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
    myBottomView.backgroundColor = [UIColor redColor];
    
    CustomViewController *customViewController = [[CustomViewController alloc] initWithViewController:<yourNavigationController> bottomView:myView];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableView (on a navigation controller stack) which is showing details for
I have a view controller that i'm trying to push onto the navigation stack.
I have created navigaton view using Sencha touch 2. Navigation view has list component
I have a navigation controller with a table view. In most tutorials I've read
I'm writing an iPhone app. Starting from a view controller in a navigation stack
I have a modal view controller whose view comes from a XIB. I want
If I have a stack of views controlled by a view controller, and a
I have created one navigation based application. In that first view show me the
I have a view controller which contains a table view, and which is wrapped
I have created a flexible navigation bar in my app that will show custom

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.