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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:13:44+00:00 2026-06-17T06:13:44+00:00

Is there anyway to determine if a modal view controller is currently being shown?

  • 0

Is there anyway to determine if a modal view controller is currently being shown? currently on view?

I have an issue where a viewDidAppear is being called twice and only needs to be called once, to resolve I would like to see if a modal view controller is on the screen if it is run one bit of code, else nothing.

It would be useful if I could code inside the current view controller on the navigation stack, and see if a modal view controller is on top of that at the present time?

  • 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-17T06:13:45+00:00Added an answer on June 17, 2026 at 6:13 am

    The correct place to check on the wellbeing of a modal viewController, is in it’s presenting viewController. The presenting viewController ought to know whether its presented viewController is still present, or has been dismissed (it is responsible for both tasks). The presentingViewController has a property, presentedViewController which carries the reference you need.

    If the modal VC has been covered up, for example by itself pushing another viewController, you would be able to ascertain that from it’s navController.viewControllers array property: again, the best reference source goes back to the presenting viewController.

    If you can’t get a reference to the modal viewController from it’s presenting viewController, there is probably is something wrong with your design, you need to rethink.

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

Sidebar

Related Questions

Is there anyway to determine how many requests or how much data you have
Is there anyway to determine the form name that the report was called from?
Is there anyway to determine the Exceptions that can be thrown by methods in
Is there a way to determine if a view is rendering as a partial?
Is there anyway to determine if a windows computer is running IPV6 using native
Is there anyway by which each reducer process could determine the number of elements
Is there anyway to determine whether an HTML file was written in HTML5?
Is there anyway to determine when a a UITextview begins a new row?
Is there anyway to determine if an object in Open Graph has been liked?
Is there anyway to determine if a value is passed as a reference, eg.

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.