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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:25:15+00:00 2026-06-02T09:25:15+00:00

My main view controller is in a navigation controller and it conforms to EditViewControllerDelegate

  • 0

My main view controller is in a navigation controller and it conforms to EditViewControllerDelegate protocol. It is the delegate of my two view controllers that I need to present modally.

@interface EditViewController : UIViewController
@property (nonatomic) id <EditViewControllerDelegate> delegate;
@end

@interface EditSomethingViewController : EditViewController
@end

@interface EditSomethingElseViewController : EditViewController
@end

In a editViewController:(EditViewController *)evc didFinishEditing:(Something *) something method, I first get the data I need then I dismiss the evc and call

[self performSegueWithIdentifier:@"My Segue" sender:self];

“My Segue” is defined in Xcode and the identifier is the same both in code and in Xcode (I tried to change it just to see if it gets called and it throws an exception)

When I change “My Seque”‘s type to push, it worked.
But with modal it doesn’t do anything after I’m back to the main view controller

What am I missing?

EDITED:

I accidentally found out a warning in my storyboard! (it’s weird because it’s not a warning in the project “visible from everywhere”)
In the connections’ inspector under “Referencing Storyboard Segues” there’s a warning for my modal segue. it says :

(null) is not a valid containment controller key path

I checked other modal segues and there is the same warning, but I didn’t need to trigger them by code so didn’t have problems before.

EDITED 2:

-(void)editViewController:(EditViewController *) evc
didFinishEditing:(Something *) something
{
    self.something = something;
    [self dismissModalViewControllerAnimated:YES];
    For ( OtherThing * otherThing in self.something.otherthingsArray)
    {
        NSLog(@"%@", otherThing);
    }
    [self performSegueWithIdentifier:@"My Segue" sender:self];
}
  • 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-02T09:25:19+00:00Added an answer on June 2, 2026 at 9:25 am

    You need to wait until your other view controller is done animating, before performing the segue. You can use the new iOS 5 method:

    [self dismissViewControllerAnimated:YES completion:^() {
        [self performSegueWithIdentifier:@"My Segue" sender:self];
    }];
    

    If you need a pre-iOS 5 way to do it, you should just add a delay to give the animation time before performing the segue.

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

Sidebar

Related Questions

I have a modal view controller that is presented from my main view, I
Im writing an app that has a navigation controller as it's main menu system
I have a Navigation Controller in my main view. And I use the following
I need some help on how to create a Navigation Controller that loads its
I have a view based app (not navigation or tab based...) My main view
I have a Navigation Controller with a View Controller displaying a button. The button
My main view controller only supports landscapeleft and landscaperight. This viewcontroller in the viewDidLoad
I made a demo empty app and add a navigation controller with the view
My application launches into a navigation controller. The root view controller has a button
I have a root view controller as the navigation controller. In the root view

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.