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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:30:07+00:00 2026-06-06T03:30:07+00:00

I have an app that uses a transition file to flip from page to

  • 0

I have an app that uses a transition file to flip from page to page. I am using ARC and works just fine on 5.1, but crashes all the time on 4.3 simulator. Looking at the thread and the extended detail from instruments, it points to 2 lines of code (shown below) with the error: EXC_BREAKPOINT (code=EXC_I386_BPT). Looks like the UIViewController is being deallocated. Not sure how to fix this. Thanks in advance for any help you can offer!

@synthesize containerView = _containerView;
@synthesize viewController = _viewController;  //ERROR LINE#1

- (id)initWithViewController:(UIViewController *)viewController
{
    if (self = [super init]) 
    {
      _viewController = viewController;
    }
    return self;
}

- (void)loadView
{
    self.wantsFullScreenLayout = YES;
    UIView *view = [[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
    view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
    self.view = view;

    _containerView = [[UIView alloc] initWithFrame:view.bounds];
    _containerView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    [self.view addSubview:_containerView];

    [_containerView addSubview:self.viewController.view];
}

- (void)transitionToViewController:(UIViewController *)aViewController
                   withOptions:(UIViewAnimationOptions)options
{    
    aViewController.view.frame = self.containerView.bounds;

    [UIView transitionWithView:self.containerView
                      duration:0.65f
                       options:options
                    animations:^{ [self.viewController.view removeFromSuperview];
                        [self.containerView addSubview:aViewController.view];}
                    completion:^(BOOL finished)
   //ERROR LINE#2                 { self.viewController = aViewController;}];
}
  • 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-06T03:30:09+00:00Added an answer on June 6, 2026 at 3:30 am

    You should not be transitioning views in and out from underneath their respective view controllers. You might get it to work, but it’s fragile, at best.

    If you want to future-proof your code, you should be transitioning between view controllers and let them handle their own views, but wrap that in the desired animation if you don’t like the default animation. So, you should either:

    1. Just do simple presentViewController or pushViewController to go to the next controller and dismissViewController or popViewController to return; or

    2. In iOS 5, you can do your own container view controller (see session 102 in WWDC 2011 or see the discussion of view controller containment in the UIViewController reference) and then you can transitionFromViewController.

    If we knew more about your app flow, why you’re doing what you’re doing, we can probably advise you further.

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

Sidebar

Related Questions

I have an app that uses the built-in flip animation to switch between the
I have a MVC app that uses Linq2Sql to access a SQL DB. But
Have an app that uses git for version control. A file called mkmf.log keeps
I have an app that uses Devise to do account creation, etc. But I
I have an app that transitions from view controller to view controller using the
I have app that uses ClickOnce deployment. It works on about a dozen machines
I have an app that uses a tab layout using fragments, in one of
I have a App that uses the In App feature. -(void) completeTransaction: (skPaymenttransaction *)transaction{
I have an app that uses the ActionBar with tabs in combination with Fragments.
I have an app that uses webView. In the home screen of a website

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.