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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:52:51+00:00 2026-05-24T00:52:51+00:00

I have a view with a bunch of button in a UIScrollView . When

  • 0

I have a view with a bunch of button in a UIScrollView. When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code.

-(void)detail:(id)sender{
    UIButton *button = sender;
    NSLog(@"tag = %i", button.tag);

    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    self.popover = [[UIPopoverController alloc] initWithContentViewController:navController];
    self.popover.delegate = self;
    [self.popover presentPopoverFromRect:button.bounds inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}

Than the problem with the size of the popover:
In the view that is inside the popover, I have:

self.contentSizeForViewInPopover = scroll.contentSize;
NSLog(@"%f, %f", scroll.contentSize.height, scroll.contentSize.width);
NSLog(@"showing: %f, %f",  self.contentSizeForViewInPopover.height,  self.contentSizeForViewInPopover.width);

and both logs are matching. So I think everything should work correctly. But it doesn’t. Here is a screen shot. Let me know if you need more of my code. Thanks in advance.

screen shot of the error

  • 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-24T00:52:52+00:00Added an answer on May 24, 2026 at 12:52 am

    Regarding the size of the popover only: I managed to do it with a variable heighted UILabel:

    UILabel *hinweis;
    hinweis.text = @"...";
    hinweis.frame = CGRectMake(x,y,width,800);
    [hinweis sizeToFit];
    

    And for the arrow: have you tried a different inView param like self.parentViewController.view?

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

Sidebar

Related Questions

i have view like 'home/details/5', it can be access by anonymous user. but there
So I have a table view that contains a bunch of data. The user
I have a view user control that can post form. This control can be
I have a view that I want to add some custom drawing to. I
I have a view on iOS with a bunch of UI widgets like sliders
I have a view that consists of a bunch of UILabels. As of right
I have a bunch of tables that I'm joining in a view. I need
I have a search field and button. When the user searches something like cat
I have a 320x460 view with a number of buttons, depending on the button
I have this SearchMenuActivity that has a bunch of options the user can select.

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.