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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:58:45+00:00 2026-06-18T22:58:45+00:00

This custom segue visually works correctly but there is an warning when completed. Warning:

  • 0

This custom segue visually works correctly but there is an warning when completed.

Warning: Attempt to present <DestViewController: 0x21059f40> on <SrcViewController: 0x1fd50cf0> whose view is not in the window hierarchy!

Any help on how to get this to work without the warning would be much appreciated, have spent more time on this than i should. Not even sure if I should care about it since it is a warning.

- (void)perform {
    UIViewController *src = (UIViewController *)self.sourceViewController;
    UIViewController *dst = (UIViewController *)self.destinationViewController;

    dst.view.alpha = 0;

    [UIView animateWithDuration:0.5
                 animations:^{
                     [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
                     [src.view addSubview:dst.view];
                     dst.view.alpha = 1;
                 }
                 completion:^(BOOL finished){
                     [dst.view removeFromSuperview];
                     //need to understand why this throws a warning but still works
                     [src presentViewController:dst animated:NO completion:^(){
                         [src reset];
                     }];
                 }];
}

UPDATE

There was a call to stop a MPMoviePlayerController in the reset method on the src UIViewController. For some reason that was causing the issue, once removed this segue works perfectly. See my answer below for final implementation of segue.

  • 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-18T22:58:46+00:00Added an answer on June 18, 2026 at 10:58 pm

    although the original issue was caused by something outside of the segue, as mentioned above, i thought i would post the full working segue code for others who may end up here. The delegate in this example is a custom UIViewController container where the child UIViewContainers where added as children in the following way:

    [self addChildViewController:childController_];
    [self.view addSubview:childController_.view];
    

    segue.h

    #import <UIKit/UIKit.h>
    
    @interface COFSimpleSegue : UIStoryboardSegue
    
    @property (assign) UIViewController *delegate;
    
    @end
    

    segue.m

    #import "COFSimpleSegue.h"
    #import <QuartzCore/QuartzCore.h>
    
    @implementation COFSimpleSegue
    
    @synthesize delegate = delegate_;
    
    - (void)perform {
        UIViewController *src = (UIViewController *)self.sourceViewController;
        UIViewController *dst = (UIViewController *)self.destinationViewController;
    
        dst.view.frame = delegate_.view.bounds;
        dst.view.autoresizingMask = delegate_.view.autoresizingMask;
    
        [src willMoveToParentViewController:nil];
    
        [delegate_
           transitionFromViewController:src
           toViewController:dst
           duration:0.5f
           options:UIViewAnimationOptionTransitionCrossDissolve
           animations:^(void){}
           completion:^(BOOL finished) {
             [dst didMoveToParentViewController:delegate_];
             [src removeFromParentViewController];
           }
        ];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this custom JSlider, which will be used in many other forms/windows. But
Is there a standard method I can use in place of this custom method?
There is this custom WCF REST service hosted inside a Sharepoint 2010 application using
I have this custom validation attribute for validating a collection. I need to adapt
i have this custom tab widget.. before i've customized it, by default i have
I have used this custom grid view in my code, and I want to
i create this custom actionlink public static IHtmlString CustomActionLink(this HtmlHelper htmlHelper, int userId, string
I have this custom textbox that I am working on and I can use
I am currently working on MGSplitViewController .So in this custom split view controller the
We are using a custom page on Tridion 2009. This custom page was working

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.