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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:20:23+00:00 2026-06-11T17:20:23+00:00

I want to create an tabBar with 15 items that can be scroll right-left

  • 0

I want to create an tabBar with 15 items that can be scroll right-left and stop in the middle and not just scrolling each time all the 5 items (320 every time)

I found a code and changed it for displaying 5 items, but when i’m scroll it, all the tab changed and the next tab with 5 items shown, and so on…

- (id)initWithItems:(NSArray *)items {

         self = [super initWithFrame:CGRectMake(0.0, 411.0, 320.0, 49.0)];
         if (self) {
        self.pagingEnabled = YES;
        self.delegate = self;

        self.tabBars = [[[NSMutableArray alloc] init] autorelease];

        float x = 0.0;

        for (double d = 0; d < ceil(items.count / 5.0); d ++) {
            UITabBar *tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(x, 0.0, 320.0, 49.0)];
            tabBar.delegate = self;

            int len = 0;

            for (int i = d * 5; i < d * 5 + 5; i ++)
                if (i < items.count)
                    len ++;

            tabBar.items = [items objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(d * 5, len)]];
            [self addSubview:tabBar];
            [self.tabBars addObject:tabBar];
            [tabBar release];
            x += 320.0;
        }

        self.contentSize = CGSizeMake(x, 49.0);
    }
    return self;
}

How can i create a ‘rubber effect’ so i can be stop on the 7 item for example.

  • 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-11T17:20:24+00:00Added an answer on June 11, 2026 at 5:20 pm

    You will have to use a different design than the one you quote. If you look at the code carefully you will notice that for each 5 items a new tab bar is created. Clearly, the functionality that you hope for is not feasible with this setup.

    The alternative would be to rewrite this with your own UIScrollView. It could be challenging to get exactly the look and feel of the UITabBar, but perhaps that is not such an important constraint. Rather, you would be free to implement your very own design that harmonizes with the look of your app.

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

Sidebar

Related Questions

I want create wordpress website into which I want create user management... That means
i want create a custom json data from the mssql 2008 results so that
I want create an application with animate button? how can i do? after click
I want create module which update list of usb devices automatically (not only mass
I want to create a custom tab bar for an iphone app that looks
Is it possible to create a item in a tabbar-ed card layout, that has
i want to create tabbar based application..but i want tab bar should be above
I have a TabBar that I've created through IB, I chose create new project
I want to create the TabBar as like Below image: Here, all tab bar
I want to create a modal view with the navigation item (right view on

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.