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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:25:58+00:00 2026-06-03T16:25:58+00:00

When a popover is displaying how can I make its size variable depending on

  • 0

When a popover is displaying how can I make its size variable depending on condition check? Is this functionality supported or not when working with a popover?

Here is my sample for changing frame size:

CGFloat newHeight = 200;
NSRect newFrame  = [parentView frame];
newFrame.size.height = newHeight;

NSView* childView = someView;

[parentView setFrame:newFrame];
[self.view addSubview:childView];
  • 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-03T16:26:01+00:00Added an answer on June 3, 2026 at 4:26 pm

    You need to change the popupwindow.contentViewController property of the NSPopover to a new NSViewController with a different-sized view.
    That is, resizing the view’s frame will only result in weird drawing problems. To get the popover window to change size, the contentViewController must be changed.

    Ideally, you would set up a new view controller which is essentially a copy of your existing NSViewController, but containing a view that is taller/shorter. But in the worst-case scenario, you can do something like this:

    gPopoverWindow.contentViewController = [[[NSViewController alloc] initWithNibName: @"tempNibName" bundle: nil] autorelease];
    NSView *v = self.view;
    NSRect b = [v frame];
    b.size.height += 25;
    [v setFrame: b];
    gPopoverWindow.contentViewController = self;
    

    In my testing, this resulted in the popover beginning a shrink animation (because of being set to the temp view controller), then growing to its new size.

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

Sidebar

Related Questions

In my Ipad application I use a popover but I'm not able to make
bootstrap popover currrently expects this: <a href=# id=example class=btn btn-danger rel=popover data-content=It's so simple
How can I get popover -like behavior in Snow Leopard? NSPopover is only available
I am attempting to create a popover similar to this in an iPad app.
While displaying a popover controller for a second time (after dismissing it and then
I am using the popover plugin from Bootstrap. ( link ) but it's not
I have a popover that contains a UITableView. This UITableView has a cell with
I'm displaying a popover in iPad with a UINavigation bar. On the second view,
I am displaying a view controller as a popover on button click, and it
Can you help me with PopOver controls? I want to display UITabbar Controller and

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.