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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:58:40+00:00 2026-05-29T04:58:40+00:00

I got a requirement where I need to implement a UIPopOverController from a UITabBarController,

  • 0

I got a requirement where I need to implement a UIPopOverController from a UITabBarController, that is in the UITabBarController when I click one of the tabs which is called for example “pop”, then the popover should show up with two fields. My question is that what is the best way to achieve this. In case if there is any example either video or just some explained material then you can also share the links with me. Just bear with me since I am getting my feet wet in the ios environment.

Any suggestions would be appreciated!

Thanks
Maks

  • 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-05-29T04:58:41+00:00Added an answer on May 29, 2026 at 4:58 am

    I put together a sample project that will display a UIPopoverController above the selected UITabBarItem.

    http://mobileoverlord.com/displaying-a-uipopovercontroller-from-a-uitabbaritem/

    This contains a little hackery because you need to iterate through the subviews of the TabBar. Also, it may be different on iOS 5 because the background view of the TabBar is in the TabBar’s subview array. Its implemented in the tabBarController delegate method

    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
    {
        NSInteger index = [[self tabBarController] selectedIndex];
        CGRect buttonFrame = [[[[[self tabBarController] tabBar] subviews] objectAtIndex:index+1] frame];
    
        PopOverViewController *popoverView = [PopOverViewController new];
        popoverView.contentSizeForViewInPopover = CGSizeMake(250, 300);
        popover = [[UIPopoverController alloc]initWithContentViewController:popoverView];
    
        NSLog(@"X:%f Y:%f",buttonFrame.origin.x,buttonFrame.origin.y);
    
        [popover presentPopoverFromRect:buttonFrame inView:self.tabBarController.tabBar permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
    }
    

    Here is the sample code. Feel free to comment and manipulate.

    https://github.com/mobileoverlord/UITabBarPopOver-Demo

    If you want to restrict it to only when a certain button is pressed you can filter the class of the incoming viewController like this

    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
    {
        if ([viewController isKindOfClass:[SecondViewController class]]) {
            NSInteger index = [[self tabBarController] selectedIndex];
            CGRect buttonFrame = [[[[[self tabBarController] tabBar] subviews] objectAtIndex:index+1] frame];
    
            PopOverViewController *popoverView = [PopOverViewController new];
            popoverView.contentSizeForViewInPopover = CGSizeMake(250, 300);
            popover = [[UIPopoverController alloc]initWithContentViewController:popoverView];
    
            NSLog(@"X:%f Y:%f",buttonFrame.origin.x,buttonFrame.origin.y);
    
            [popover presentPopoverFromRect:buttonFrame inView:self.tabBarController.tabBar permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a requirement where I need to write a HTML/CSS, which should
I have got a requirement from a client. They need three blogging web application
Got a requirement to rebuild mssql full-text index. Problem is - I need to
I got the requirement to display output from an IP camera to the webpage
We've got an interesting requirement that we'll want to support multiple languages at runtime
I think this question is quite common. Recently I have got a requirement that
I've got a requirement that I believe must occur very frequently around the world.
I have a requirement in which i need to call webservice 12 times for
I got a system which queries LDAP, pulls 50,000 records (say) and formats that
I'm going to need to push and pull files from a SharePoint site that

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.