this issue is supposed to be a simple one...
i have googled a lot about it and i have tried all the setups on my project.
the thing is i am working on a project that is not mine. the app launched from the app delegate and then i am adding aUIViewController
(without XIB file) everything done by code.
the ViewController is actually on landscape, but the thing is the the app is running on portrait (when i am pulling the notification view it turns dow like in the portrait mode).
this is implemented in the AppDelegate.m file:
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationLandscapeRight;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskLandscapeRight|UIInterfaceOrientationMaskLandscapeLeft|UIInterfaceOrientationMaskPortrait;
//if i am writing only the landscape right orientation the app crashes!
}
* Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES' * First throw call stack: (0x3bfef2a3 0x35ede97f 0x3bfef1c5 0x3518988f 0x3532e579 0x3520dd3d 0x3520cfc7 0x3532f257 0xa5bc1 0x35188319 0x351a4f0f 0x351a4e97 0x3512aa33 0x3bfc46cd 0x3bfc29c1 0x3bfc2d17 0x3bf35ebd 0x3bf35d49 0x3a3032eb 0x351752f9 0x9803b 0x97fe0) libc++abi.dylib: terminate called throwing an exception
if i am writing it with the portrait mode the app launches. i have also tried to add row in the info.plist
and set the key to initial interface orientation value to the landscape (right home button).
also put the supported interface orientation to lanscape as well.
non of this change anything, i just want to know how i can get that behavior to get the notification from above in the landscape mode
Anyone, thanks!
**`
`**