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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:41:13+00:00 2026-06-17T17:41:13+00:00

I am using a UITabBar in an iPhone and iPad app, but autoresizing is

  • 0

I am using a UITabBar in an iPhone and iPad app, but autoresizing is not working on the iPad when I go to landscape mode (it works fine on the iPhone).

{
    tabBarController =[[UITabBarController alloc]init];
    tabBarController.delegate=self;
    self.tabBarController.viewControllers = [NSArray arrayWithObjects:navController1,navController2, navController3,navController4,navController5,nil];
    tabBarController.selectedViewController = navController1;
    imgTab = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,768.0,51)];
    [imgTab setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin |   UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin]; imgTab.image=[UIImage imageNamed:@"footerbg.jpg"];
    [tabBarController.tabBar addSubview:imgTab];
    accountImg=[[UIImageView alloc]initWithFrame:CGRectMake(150.0,5.0,29.0,29.0)];
    [accountImg setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin |   UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin];
    accountImg.image=[UIImage imageNamed:@"click11.png"];
    UITabBarItem *tabItem = [[[tabBarController tabBar] items] objectAtIndex:0];
    [tabItem setTitle:@"Task"];
    [imgTab addSubview:accountImg];
    staffImg=[[UIImageView alloc]initWithFrame:CGRectMake(255,5.0,29.0,29.0)];
    staffImg.image=[UIImage imageNamed:@"spreadsheet11-1.png"];
    UITabBarItem *tabItem1 = [[[tabBarController tabBar] items] objectAtIndex:1];
    [tabItem1 setTitle:@"SpreadSheet"];
    [staffImg setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin |   UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin];
    [imgTab addSubview:staffImg];
    taskImg=[[UIImageView alloc]initWithFrame:CGRectMake(370.0,5.0,29.0,29.0)];
    taskImg.image=[UIImage imageNamed:@"calendar2.png"];
    UITabBarItem *tabItem2 = [[[tabBarController tabBar] items] objectAtIndex:2];
    [tabItem2 setTitle:@"Calendar"];
    [taskImg setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin |   UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin];
    [imgTab addSubview:taskImg];
    spreadImg =[[UIImageView alloc]initWithFrame:CGRectMake(472.0,5.0,29.0,29.0)];
    spreadImg.image=[UIImage imageNamed:@"message22.png"];
    UITabBarItem *tabItem3 = [[[tabBarController tabBar] items] objectAtIndex:3];
    [tabItem3 setTitle:@"Message"];
    [spreadImg setAutoresizingMask: UIViewAutoresizingFlexibleHeight |   UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin |   UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin];
    [imgTab addSubview:spreadImg];

}
  • 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-17T17:41:14+00:00Added an answer on June 17, 2026 at 5:41 pm

    I don’t see anywhere in this code that you are configuring UIAutoresizingMask for your UITabBar, only for items in it.

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

Sidebar

Related Questions

Im working on an iPhone app, not using IB, and programmatically created a UITabbar
In my iphone application I put a UITabBar (not using UITabBarController) in the bottom
I try to place UITabbar on iPhone window using CGRectMake. But I found that
I have a root UIViewController subclass that has a UITabBar, (I'm not using UITabBarController)
We wanted to use a UITabBar in our iPhone app, but with one exception:
I have an iPad app, using XCode 4.5, Storyboards, UITabBarController and iOS 6. I
I have an iPhone app which was built using a standard UITabBarController. This app
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
I'm currently developing a simple iPhone application using a UITabBar and table views for
I have an app that is using a UITabBar and UINavigationBar . I am

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.