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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:24:48+00:00 2026-06-07T21:24:48+00:00

I wanted to have the tab bar at the top. So i created a

  • 0

I wanted to have the tab bar at the top.

So i created a new project in XCode. Added a view and then inside that view i added (scrollbar, text and another view). See picture.

Storyboard view of the MainWindow. Top part is for the tab host, middle is for content and bottom is for copyright

What i wanted was to have my tab bar at the top. Then in the middle would be the contents from the tab bar and below it a small copyright text. See picture.

All controls that i have added in the StoryBoard

No idea how to make this correctly. I have tried to create the UITabBarController on the fly and then assign it into the view at the top. (Top white space on the picture dedicated for the tab bar).

Here is my code to init the MainWindow.

MainWindow.h

#import <UIKit/UIKit.h>

@class Intro;

@interface MainWindow : UIViewController
@property (strong, nonatomic) IBOutlet UIScrollView *mainContentFrame;
@property (strong, nonatomic) IBOutlet UIView *mainTabBarView;
@property (strong, nonatomic) UITabBarController *mainTabBar;

@property (nonatomic, strong) Intro *intro; // Trying to get this tab to show in the tab bar

@end

MainWindow.m

#import "MainWindow.h"
#import "Intro.h"

@interface MainWindow ()

@end

@implementation MainWindow
@synthesize mainContentFrame = _mainContentFrame;
@synthesize mainTabBarView = _mainTabBarView;
@synthesize mainTabBar = _mainTabBar;

@synthesize intro = _intro;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    _intro = [[Intro alloc] init];
    NSArray *allViews = [[NSArray alloc] initWithObjects:_intro, nil];

    [super viewDidLoad];
    // Do any additional setup after loading the view.

    _mainTabBar = [[UITabBarController alloc] init];
    [_mainTabBar setViewControllers:allViews];

    [_mainTabBarView.window addSubview:_mainTabBar.tabBarController.view];
}

- (void)viewDidUnload
{
    [self setMainTabBar:nil];
    [self setMainContentFrame:nil];
    [self setMainContentFrame:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

What am i missing to get this to work? Wanted the content to end up in the scrollview so that all tabs are scrollable.

  • 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-07T21:24:49+00:00Added an answer on June 7, 2026 at 9:24 pm

    iOS User Interface Guidelines say that the UITabBar has to be at the bottom of the ViewController. You should either create your own GUI for this kind of View or use the “old-fashioned” way. I would not try to hack around the UITabBar as your app may be rejacted by Apple.

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

Sidebar

Related Questions

I have created a new Xcode project using Storyboards (tab view template). I added
I'm making a tab bar iphone app and I wanted to have an animated
I have a pretty straight forward page tab app that can be added to
Hey, I have a tab host, and I wanted that when I clicked on
I have created this fan page http://www.facebook.com/pages/ohlala/327385737341 and added an application on tab "Special
I have a tab bar controller with four different views. Recently, I wanted to
I wanted to have a list of lambdas that act as sort of a
If I wanted to have a collection that described the (recursive) contents of a
I have an application that requires synchronization and I wanted to inform the user
I have five tabs in my tab Bar Application. I have give access to

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.