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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:47:03+00:00 2026-05-22T15:47:03+00:00

I am presenting a modal view controller to show detailed information. I have it

  • 0

I am presenting a modal view controller to show detailed information. I have it set up so that any change to the information in the modal view controller will change the information in its parent view controller.

The information is changed, but I cannot manage to reload the gridView data when the modal view controller is dismissed. Right now I have the action to dismiss the modal inside the modal view controller. Everything works good, I just can’t reload the data for the gridView from the modal view controller.

I read somewhere that one of the options is to create a delegate that will be able to dismiss the modal view controller from the parent view controller, I just can’t seem to find examples or nice tutorials on how to go by doing this. The truth is that I know how to use the delegates, but not quite sure on how to properly implement one.

Can anyone please point me in the right direction here? Maybe someone has a better option. I am open to any suggestions.

  • 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-22T15:47:03+00:00Added an answer on May 22, 2026 at 3:47 pm

    If I understand clearly, you want to reload the grid contained in your parent view controller when you dismiss the modal view controller. If so, here how:

    Declare a protocol in your ModalViewController by doing something like

    @protocol MyViewControllerDelegate;
    
    @interface MyViewController : UIViewController {
    
        id<MyViewControllerDelegate>delegate;
        // Your stuff
    }
    
    @property (nonatomic, assign) id<MyViewControllerDelegate>delegate;
    
    @end
    
    @protocol MyViewControllerDelegate <NSObject>
    
    -(void)viewControllerWasDismissedOrAnyOtherNameYoudLike;
    
    @end
    

    And in your .m file, just @synthesize delegate.

    Just when you call dismissModalViewController:animated:, also call [delegate viewControllerWasDismissedOrAnyOtherNameYoudLike].

    In your view controller with the grid view, import the header file of your modalviewcontroller, conform to the protocol

    @interface MyGridViewController : UIViewController <MyViewControllerDelegate>
    

    When you init the Modalview controller, set the delegate to self, and implement the viewControllerWasDismissedOrAnyOtherNameYoudLike method.
    Voilà!

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

Sidebar

Related Questions

I have a view controller (view A) presenting a modal view (B) when the
I have a view controller and I am presenting it modal, as in... UIViewController
I'm presenting a modalViewController. After I dismiss the modal view controller with: - (void)dismissModalViewControllerAnimated:(BOOL)animated
I have a tab bar application and when I display a modal view controller,
I am presenting a modal view controller. If it matters, it is scrolling up
We have a modal view that contains a Table view that contains UITableViewCells used
I'm dismissing a modal view controller and then immediately presenting another one, but the
I have a modal view controller which is crashing when it dismisses itself. The
Is there some property so that I can reference the presenting view controller from
I have a UIViewController (MyViewController) and another view controller i'm presenting modally though MyViewController

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.