[
https://issues.apache.org/jira/browse/CB-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459587#comment-13459587
]
Klaus Schmidt commented on CB-1511:
-----------------------------------
OK, now the proper solution:
Extend "CDVCapture.h" with following:
@interface CDVNavigationController : UINavigationController
@end
Change line 88 in "CDVCapture.m" to the following:
CDVNavigationController *navController = [[CDVNavigationController alloc]
initWithRootViewController:audioViewController];
Implement the CDVNavigationController in "CDVCapture.m" as shown in the post
above:
@implementation CDVNavigationController
-(NSUInteger) supportedInterfaceOrientations {
return [self.topViewController supportedInterfaceOrientations];
}
@end
And last but not least extend the implementation of
"CDVAudioRecorderViewController" with the two methods shown in the post above:
- (NSUInteger)supportedInterfaceOrientations
{
NSUInteger ret = 0;
if ([self
shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait])
ret = ret | (1 << UIInterfaceOrientationPortrait);
if ([self
shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown])
ret = ret | (1 << UIInterfaceOrientationPortraitUpsideDown);
return ret;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
This solution should be able to pass Apple validation, shouldn't it? If not,
please show me the right way.
Greetings,
Klaus.
> Cordova 2.1/2.2 Audio Capture iOS6 CDVAudioRecorderViewController wrong
> orientation
> -----------------------------------------------------------------------------------
>
> Key: CB-1511
> URL: https://issues.apache.org/jira/browse/CB-1511
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 2.1.0, 2.2.0
> Environment: iOS6, iPad3, Cordova 2.1.0 with 2.2.0-fix CB-1465
> Reporter: Klaus Schmidt
> Assignee: Becky Gibson
> Fix For: 2.2.0
>
> Attachments: screenshot1.PNG, screenshot2.PNG
>
>
> Hi,
> I've running the actual code of Cordova 2.1.0 with the mainViewController-fix
> CB-1465.
> If I want to capture an Audio-File when the app is in landscape mode, the
> CDVAudioRecorderViewController has the wrong orientation (screenshot1), the
> orientation is not fixed in portrait mode, it is, like the other app, running
> in landscape mode. If I rotate the iPad to portrait mode, the
> CDVAudioRecorderViewController is displayed correctly (screenshot2).
> Can you please fix this? I think, you can set the orientation to
> portrait-mode to a fix portrait-mode orientation, but I don't know how...
> Thanks and greetings,
> Klaus.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira