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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:03:30+00:00 2026-06-08T04:03:30+00:00

I am new with Objective-C so apologies for a dumb question. I am opening

  • 0

I am new with Objective-C so apologies for a dumb question.

I am opening an “options” view controller from my main view controller. Both are built in the storyboard. Before and after presenting the options controller I need to stop and start a timer on my main view controller. After the options controller is closed (a button calls dismiss) I need to send some info back to my main controller or at least let my main controller know that it needs to refresh some values.

MAIN QUESTION
What’s the best way of presenting a view controller and executing some presenter’s methods before and after opening?

WHAT I’VE TRIED
I found a few ways to do it, but they are all cumbersome and I assume that there must be some plausible way of doing it.

  1. Ideally I’d like to use the segue I set up in the storyboard between the two controllers.
  2. I managed to call the options controller programmatically by accessing the storyboard and calling instantiateViewControllerWithIdentifier. It worked but looks a bit complex.
  3. I was not able to find a delegate method on the UIViewController to handle the dismiss event
  4. When I was trying to access the main controller in the options controller via presentingViewController and downcasting it, I got a linkage error by including my .h file twice (not sure what are the Obj-C standards of using #define).

Appreciate your help…

  • 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-08T04:03:32+00:00Added an answer on June 8, 2026 at 4:03 am

    Thanks for replies.

    I ended up with

    1. Calling prepareForSegue to execute pre-transition code

    2. Calling performSelector on presentingViewController when releasing presented view controller.

    I am sure other suggestions would work too.

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

Sidebar

Related Questions

First, new to Cocoa and Objective-C, so my apologies if this is unclear and
I am making a new Objective C class and it gave two options as
Apologies or asking what is probably a very straightforward question, but I'm new to
I'm new to iPhone development, so apologies if this is a silly question, but
New to objective-c and I just can't find the answer to this question anywhere.
I am a new Objective-C programmer coming from a C#, VB.NET, Etc. These are
fairly new to Objective-C and iOS development (coming from PHP) and I have a
I'm new to objective-c 2.0 (coming from .NET c#) and I discovered the Properties.
I am new Objective C. I am trying to understand and workout problems from
I am fairly new to Objective-C. Currently porting my own library from C#/Java to

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.