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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:58+00:00 2026-05-12T18:50:58+00:00

I am not sure if something has changed in the iPhone SDK 3.0 but

  • 0

I am not sure if something has changed in the iPhone SDK 3.0 but I am getting the strangest error. I have a view controller hierarchy where I switch between view controllers depending upon interface orientation. From what I can tell, the error is caused whenever I rotate the interface a view controller which has been deallocated is being sent a shouldAutorotateToInterfaceOrientation message. This is the backtrace for the error:

#0 0x01dc43a7 in ___forwarding___
#1 0x01da06c2 in __forwarding_prep_0___
#2 0x002e6733 in -[UIWindow _shouldAutorotateToInterfaceOrientation:]
#3 0x002e6562 in -[UIWindow _updateToInterfaceOrientation:duration:force:]
#4 0x002e6515 in -[UIWindow _updateInterfaceOrientationFromDeviceOrientation]
#5 0x0004d63a in _nsnote_callback
#6 0x01d8f005 in _CFXNotificationPostNotification
#7 0x0004aef0 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#8 0x0045b454 in -[UIDevice setOrientation:]
#9 0x002d6890 in -[UIApplication handleEvent:withNewEvent:]
#10 0x002d16d3 in -[UIApplication sendEvent:]
#11 0x002d80b5 in _UIApplicationHandleEvent
#12 0x024c2ef1 in PurpleEventCallback
#13 0x01d9bb80 in CFRunLoopRunSpecific
#14 0x01d9ac48 in CFRunLoopRunInMode
#15 0x024c17ad in GSEventRunModal
#16 0x024c1872 in GSEventRun
#17 0x002d9003 in UIApplicationMain
#18 0x00002d50 in main at main.m:14

The error that is getting printed to the Debug Console with NSZombieEnabled is:

2009-10-18 20:28:34.404 Restaurants[12428:207] *** -[ToolbarController respondsToSelector:]: message sent to deallocated instance 0x3b2b2a0
(gdb) continue
Current language:  auto; currently objective-c
2009-10-18 20:31:43.496 Restaurants[12428:207] *** NSInvocation: warning: object 0x3b2b2a0 of class '_NSZombie_BeltToolbarController' does not implement methodSignatureForSelector: -- trouble ahead
2009-10-18 20:31:43.496 Restaurants[12428:207] *** NSInvocation: warning: object 0x3b2b2a0 of class '_NSZombie_BeltToolbarController' does not implement doesNotRecognizeSelector: -- abort

What I can’t understand is why the system is trying to message this controller even though it has been deallocated and is there a way to tell the system that the controller doesn’t exist any longer.

[UPDATE]:
I have put together a sample project replicating the bug: download

Load up the app and then change the Simulator’s orientation a few times from Landscape to Portrait and it should occur. I have tried the same piece of code on a physical phone and it behaves in exactly the same way, so this is not a simulator related issue.

[UPDATE]:
I have used up one of my support requests with Apple’s technical team to see if they can help me get to the bottom of this. Will post the solution – if they have one – here. Thanks for the help so far.

  • 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-05-12T18:50:59+00:00Added an answer on May 12, 2026 at 6:50 pm

    So after a week of waiting, Apple Developer Technical Support managed to help me sort my problem out. Here is their response:

    “I’ve looked over your code and found
    a few things you need to be concerned
    about, some of which may contribute to
    your problem. In your
    ControllerSwitchAppDelegate.m
    source, you are implementing
    “didRotate” method. It might be
    worth checking for device orientation
    notifications at the view controller
    level rather than at the UIApplication
    level. This will make your code much
    more simpler and encapsulated allowing
    each view controller that is shown to
    handle its own rotation logic. You
    are also using multiple view
    controllers at the same time, that
    being, both “view” properties are
    being added and remove when the device
    is rotated. This is not exactly the
    common approach in which to use the
    UIKit. The idea is to present one
    view controller (or its view property)
    at a time and not have a parent view
    controller swap in different sub-view
    controllers. Granted on the surface
    your approach seems doable, but in the
    long run, I recommend a different
    approach.

    We have a sample called
    “AlternateViews”, which can be found
    at –
    http://developer.apple.com/iphone/library/samplecode/AlternateViews/index.html

    In this sample, it pretty much does
    what you need. It provides an
    “alternate” view controller for a
    given device orientation. Is merely
    presents one view controller over
    another using
    “presentModalViewController” with a
    transition property called
    “modalTransitionStyle” which will give
    you a cross fade affect.”

    What I ended up doing was using a super view controller that presented and dismissed view controllers. Rather than swapping view controllers and removing sub views using the AppDelegate.

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

Sidebar

Related Questions

I'm trying to implement something similar to what http://www.ancestry.com has, but I'm not sure
I'm not sure if I'm missing something really obvious, but I keep getting a
I have to be missing something simple, but I'm really not sure what. I
Not sure if I've just missed something but this doesn't work: $(this).children('td.threadtitle a').html('thread title');
I am not sure if I am missing something grotesquely obvious or what, but
I am not sure if this is possible, but I have a scenario where
I'm not sure if this is something I should do in T-SQL or not,
I'm trying to do something and I'm not sure how to do it. I
I heard something funny the other day, that I'm not sure that I trust,
I am not even sure how to ask this question. I want something that

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.