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

  • Home
  • SEARCH
  • 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 8787881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:00:28+00:00 2026-06-13T22:00:28+00:00

I have a custom view in a tab bar view controller. I have set

  • 0

I have a custom view in a tab bar view controller. I have set the autoresize mask for the custom view but it is not getting aligned on the iphone 5 screen. It looks fine on the iphone 4 screen. I have this code in the view did load method of the tab bar view controller.

self.customBadge = [CustomBadge customBadgeWithString:[AppGlobals sharedInstance].badgeNumber];


     self.customBadge.frame = CGRectMake(165, 420,  self.customBadge.frame.size.width,  self.customBadge.frame.size.width);
    self.customBadge.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
    [self.view addSubview: self.customBadge];
  • 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-13T22:00:29+00:00Added an answer on June 13, 2026 at 10:00 pm

    It seems that you are adding your badge with coordinates according to the whole view of the TabBar (Most screen)

    Try:

    1. Adding the badge as a subview of the tabbar view itself (You may want to lower the frame’s Y from 420 to about 5-10):

      [self.tabBar addSubview:self.customBadge];

    2. If (1) is not working for you, you may try a hard coded y value (this is bad practice, but if you’re stuck – it should work):

      #define VALUE_BY_SCREEN_HEIGHT(regular, longScreen) (([[UIScreen mainScreen] bounds].size.height <= 480.0) ? regular : longScreen)

      …

      self.customBadge.frame = CGRectMake(165, VALUE_BY_SCREEN_HEIGHT(420,508), self.customBadge.frame.size.width, self.customBadge.frame.size.width);

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

Sidebar

Related Questions

I have an application set up where the window contains a tab bar controller
I have a custom tab bar controller subclass and instead of a tab bar,
I have a custom view, that has page and block. But the problem when
I have a tab bar controller and a bunch of the same tabs. Each
I have a naviation controller. I create a tab bar controller and add 3
I want to build a custom tab bar for mya app and I have
I have an app with a tab bar controller at the root. The home
I had an app delegate and I needed to add custom tab bar controller
I have a three view tab bar app the second view of which I
i have a view controller with some custom buttons in it, AND AFTER CLICKING

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.