草庐IT

ORIENTATION

全部标签

ios - MPMoviePlayerViewController 启用横向模式

我正在向我的应用添加一个MPMoviePlayerViewController,如下所示:MPMoviePlayerViewController*vc=[[MPMoviePlayerViewControlleralloc]initWithContentURL:movieURL];;[selfpresentMoviePlayerViewControllerAnimated:vc];一切正常,但我无法启用横向模式。除了实际的MPMoviePlayerViewController之外,我希望我的整个应用程序都是纵向的。我在谷歌上搜索,但所有解决方案都要求应用程序的其余部分也处于横向状态。我需

ios - 全屏时防止 MPMoviePlayerController 旋转和缩放到纵向

在iPhone4/4s的iOS5应用程序中,我有一个UIViewController,它的View中添加了一个MPMoviePlayerControllerView:[self.viewinsertSubview:self.fullscreenMoviePlayerController.viewatIndex:2];UIViewController仅支持横向:-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{//ReturnYESforsupportedo

android - 如何处理来自移动设备的视频方向

我有一个服务器组件,可以处理网络/iOS/Android应用程序的视频上传。但是我在处理视频方向时遇到了问题。有解决这个问题的好方法吗?我有一个工具MediaInfo可以从设备中提取元数据,但这就是我遇到的情况iOS肖像是正确的90或270风景很疯狂。如果你用左边的按钮握住设备,它会报告前置摄像头为0,后置摄像头为180安卓这里的情况是颠倒的,前后摄像头的风景都是正确的肖像是90或270,具体取决于您使用的是前置还是后置摄像头此外,一些设备如MotorolaDroids和Evo4G根本不记录元数据有没有人看到一个干净的解决方案? 最佳答案

ios - 在 UIViewController 上设置方向

我正在尝试为UIViewController设置方向并禁止该UIViewController上的所有方向更改。重要的是要注意该应用程序允许所有方向,但在这个单一ViewController上我只想允许纵向。我正在使用iOS8,该应用程序适用于iOS6及更高版本。所描述的行为发生在iOS7和8中。我无法在iOS6中测试它,所以我不确定它是否发生在iOS6中。我实现了以下方法:-(BOOL)shouldAutorotate{returnNO;//I'vealsotriedreturningYES-nosuccess}-(NSUInteger)supportedInterfaceOrient

objective-c - 尝试 segue 时旋转中断

我的应用程序中有一个ScrollView,第二个我滚动到我的ScrollView的最后一页,我被转到tableviewcontroller。但是为了在从scrollview跳转到tableviewController时实现“像动画一样的分页”,我扩展了UIStoryboardSegue类并实现了这样的执行方法:-(void)perform{UIViewController*src=(UIViewController*)self.sourceViewController;UIViewController*dst=(UIViewController*)self.destinationVie

iOS 6 iAd 方向问题 - iAds 将我的仅纵向应用程序旋转为横向并保持原样

我已经创建了一个iOS6“单一View”iPhone应用程序。应用程序只有纵向。我在应用程序中添加了iAds。我像这样向应用程序添加额外的View:if(self.menuChoiceInstance==nil){self.menuChoiceInstance=[[NJDViewControllerMenuChoicealloc]initWithNibName:@"NJDViewControllerMenuChoice"bundle:nil];self.menuChoiceInstance.delegate=self;}[self.viewaddSubview:self.menuCho

javascript - 为 Phonegap/Cordova iOS 应用强制执行正确的方向横向模式

是否可以强制您的Phonegap应用仅使用正确的横向模式?我知道这对于nativeiOS应用程序是可行的(请参阅Xcode中设置的屏幕截图)我唯一能找到的Phonegap是config.xml中的方向首选项:此首选项强制以横向模式显示应用程序,但允许您将屏幕旋转180度。这不是想要的结果。 最佳答案 iOS版在config.xml中设置:或在“UISupportedInterfaceOrientations”资源文件夹下ios文件夹的“ProjectName”-info.plist文件中设置:UIInterfaceOrientati

ios - 在 UINavigationViewController 上推送(推送 segue) View 后方向不会改变

我在UINavigationController中嵌入了一个UIViewController。此Controller的View方向设置为纵向。当我在此UIViewController上推送一个新View时,它只是横向的,新View也显示为纵向,而不是方向横向。我尝试继承UINavigationController并添加如下方法:-(BOOL)shouldAutorotate{returnself.topViewController.shouldAutorotate;}-(NSUInteger)supportedInterfaceOrientations{returnself.topVi

ios - 我怎样才能为一个 viewController iOS 禁用横向

我的项目有UITabbar、UınavigationBar和UIViewContoller。-UITabbar—UINavigationController—UIViewController问题:我怎样才能横向禁用一个viewController?我只想纵向View,但只有一个View。 最佳答案 disableautorotateonasingleUIViewControlleriniOS6将此添加到您的应用委托(delegate)-(NSUInteger)application:(UIApplication*)applicati

iphone - iOS 方向更改不起作用也未收到 UIDeviceOrientationDidChangeNotification

我是iOS的新手,我正在拼命尝试让方向更改在我的应用程序中正常工作。研究完后我会这样做:在我的应用程序中,我有一个管理七个UIViewController子类的NavigationController。在项目摘要选项卡中,我激活了所有4个设备方向。每个UIViewcontroller子类都有一个xib文件,所有xib文件都激活了“autoresizesubviews”。UIViewController的子类都有:-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientati