Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sergio10

macrumors regular
Original poster
Oct 3, 2007
137
0
Hi guys,

I have a problem: when rotate a device to landscape position and some UIImageView creates in the UIViewController sometimes my application crashes.
How to avoid landscape orientation and crash?

I've already inserted into info.plist:
"Initial interface orientation" "Portrait (bottom home button)"

Also added:
PHP:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
	// Return YES for supported orientations
	return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
to all UIViewControllers.

Here is a crash report:
PHP:
Thread 0 Crashed:
0   libobjc.A.dylib               	0x00003ebc objc_msgSend + 20
1   UIKit                         	0x0006c504 -[UIWindow _shouldAutorotateToInterfaceOrientation:] + 60
2   UIKit                         	0x00144b10 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 36
3   UIKit                         	0x00087564 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation] + 112
4   UIKit                         	0x0006e7d8 -[UIWindow _handleDeviceOrientationChange:] + 72
5   Foundation                    	0x0004d5d2 _nsnote_callback + 178
6   CoreFoundation                	0x0005150a _CFXNotificationPostNotification + 298
7   Foundation                    	0x0004b1ac -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
8   UIKit                         	0x0006e768 -[UIDevice setOrientation:] + 124
9   UIKit                         	0x00056d3c -[UIApplication handleEvent:withNewEvent:] + 5424
10  UIKit                         	0x00055634 -[UIApplication sendEvent:] + 60
11  UIKit                         	0x0005508c _UIApplicationHandleEvent + 4528
12  GraphicsServices              	0x00005988 PurpleEventCallback + 1044
13  CoreFoundation                	0x00057524 CFRunLoopRunSpecific + 2296
14  CoreFoundation                	0x00056c18 CFRunLoopRunInMode + 44
15  GraphicsServices              	0x0000436c GSEventRunModal + 188
16  UIKit                         	0x00003c28 -[UIApplication _run] + 552
17  UIKit                         	0x00002228 UIApplicationMain + 960
18  Tracker                       	0x00009124 main (main.m:14)
19  Tracker                       	0x00002218 start + 44

Thank you.
 
You'd think a simple captcha would be enough for this purpose. Never mind.

captchas aren't good enough anymore. What still works is human things like.
Is fire hot or cold?

I had my own forums going for awhile and this is the way to stop spam.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.