Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS Rotating Phone crashes
    primarykey
    data
    text
    <p>I support portrait only ATM, I get these error when rotating the device:</p> <pre><code>[__NSCFData setProperRotation]: unrecognized selector sent to instance 0x2dc890 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFData setProperRotation]: unrecognized selector sent to instance 0x2dc890' </code></pre> <p>This is in iOS5.1. Initially I just left the default portrait clause in, but changed it to:</p> <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (interfaceOrientation == UIInterfaceOrientationPortrait) { // Or whatever orientation it will be presented in. return YES; } return NO; } </code></pre> <p>I am using ARC btw. </p> <p>Hoping that would help stop the crashing. My info.plist has portrait and portrait upside down. There is nothing else I have done thats stock practice except my main view has multiple ViewControllers and its set to:</p> <pre><code>self.wantsFullScreenLayout=YES; </code></pre> <p>Any ideas peoples? Thanks in advance.</p> <p>My project adds the main view from the appdelegate as such:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. mainViewController=[[MainViewController alloc] init]; [self.window addSubview:mainViewController.view]; </code></pre> <p>And I have 2 ViewControllers on that mainViewController and I use a Navigation controller to push several ViewControllers as such:</p> <pre><code>- (void) loadActionsView { NSArray* views = [self.navigationController viewControllers]; if ([views containsObject: actionsPanelViewController]) { [self.navigationController popToViewController:actionsPanelViewController animated:YES]; } else { [self.navigationController pushViewController:actionsPanelViewController animated:YES]; } [[StateModel stateModel] setCurrentScreenIndex:0]; </code></pre> <p>}</p> <p>This is the first view that is called btw.</p> <p><strong>Update 2 with Solution/problem found:</strong></p> <p>I was using part of SHK the SHKActivityIndicator, that had a notification that was capturing the screen rotation and its selectors where causing the issue:</p> <pre><code>[[NSNotificationCenter defaultCenter] addObserver:currentIndicator selector:@selector(setProperRotation) name:UIDeviceOrientationDidChangeNotification object:nil]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload