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:
to all UIViewControllers.
Here is a crash report:
Thank you.
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);
}
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.