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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:59:04+00:00 2026-06-18T08:59:04+00:00

I had this block of code and it worked on iPhone 4S and below.

  • 0

I had this block of code and it worked on iPhone 4S and below. Now with iPhone 5s 4 inch screen it throws an error. I can get around it by commenting out [appDel.navController.view removeFromSuperview]; but I dont think that is the proper way. I dont think this is either so if someone can shed a little light on this that would be great.

Thanks

Code:

[appDel.tabController setSelectedIndex:0];
[appDel.window addSubview:appDel.tabController.view];
[appDel.window bringSubviewToFront:appDel.navController.view];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.6];
[UIView setAnimationDelegate:self];

[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:appDel.navController.view.superview cache:NO];
[appDel.navController.view removeFromSuperview];
  • 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-18T08:59:06+00:00Added an answer on June 18, 2026 at 8:59 am

    When you are referring to a some object via multiple accessors, e.g. “appDel.navController.view” (I’m trying to think of the formal Objective C name for this, maybe somebody looking at my answer down the road could remind me), it’s very likely that you can get burned by a result not being what you would expect it to be.

    In my own code, I try to do as much error checking as possible.

    The code below might help you to isolate the issue. In a practical sense, you don’t need so many lines of code, but this might help you to get the idea of what might be going wrong here.

    if(appDel)
    {
        if(appDel.navController)
        {
            if(appDel.navController.view)
            {
                [appDel.navController.view removeFromSuperview];
            } else {
                NSLog( @"the view of navController is NULL" );
            }
        } else {
            NSLog( @"navController is NULL" );
        }
    } else {
        NSLog( @"appDel is NULL" );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had this block of code working but not anymore... Index.php <!doctype html> <?php
Can anyone tell me why this block of code isn't being executed? I copied
I had this block of code: try { // DO SOMETHING } catch (Exception
Had this working; at one stage. The problem is the following text is now
I had this problem before and can't for life of me remember how to
I had this nasty bug that disappeared in the past but now after quite
I had this doubt for sometime now, some people say that there's no such
I had this error when I browse new web site that site sub from
I had this code trace in my Razor view @{ string markerPlacementScript = alert('Hello');
I had this code in a project in VS2010 - it was a placeholder

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.