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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:19:57+00:00 2026-05-31T22:19:57+00:00

If you want to dismiss a popover — for example, from a button within

  • 0

If you want to dismiss a popover — for example, from a button within the popover’s contentViewController you must —

  1. Create a reference to the popover to be held by view controller which creates it
  2. Create a notification from the contentViewController to let the owning view controller know that it should be dismissed, or alternately create a delegate for the same purpose
  3. Send the notification or delegate message when the popover is ready to be dismissed
  4. Call dismissPopover:animated when the notification or delegate method is called

Meanwhile, from a UIViewController you can access the modal view controller, the parent view controller, the navigation controller, the split view controller, the tab bar controller, the search display controller, the child view controllers, the presenting view controllers, and the presented view controllers.

Is there a better approach to do this from popover’s contentViewController?

  • 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-31T22:19:59+00:00Added an answer on May 31, 2026 at 10:19 pm

    Unfortunately, you’ll have to create a weak property reference to said UIPopoverController as there’s no way to access it from within the content view controller.

    I was surprised how UIViewControllers can access the modal view controller, the parent view controller, the navigation controller, the split view controller, the tab bar controller, the search display controller, and as of iOS 5, the child view controllers as well as presenting and presented controllers…but not the popover controller (granted popovers aren’t UIViewControllers but still).

    Technically, there’s a private, undocumented method to retrieve the popoverController that the UIViewController is in…I have no idea why they never made it public given that it should be exactly the same as any of the above controllers.

    Though even in the private, undocumented world, there’s no equivalent to dismissModalViewcontrollerAnimated:. You’ll still have to get that reference then dismiss it that way.

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

Sidebar

Related Questions

I want to dismiss a FormSheetPresentation modal view controller when the user taps outside
I am trying to dismiss a UIPopoverViewControler from a button in the Popover. In
I want to dismiss keyboard by click dismiss button ,How to build a bar
I want to show a specific ViewController (or dismiss) a View after performing an
Possible Duplicate: Disable back button in android i don't want to dismiss my dialog
I am working on the Popover controller where I create a popover control on
I have a modal view controller that initiates a process. If I dismiss the
In iOS 4, if you want to dismiss two nested modal view controllers, the
want to have a Hyperlink-Button in a gridView in which I can display a
In order to avoid a huge hassle with ugly UI glitches from the popover's

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.