草庐IT

Landscape

全部标签

ios - 为什么 iPhone 6 Plus Landscape 不使用 preferredContentSize?

在我的iOS8应用程序中,除了iPhone6Plus横向模式之外,此弹出窗口转场在所有方向的所有设备上均正确显示:这是它在iPhone6Plus横向上的样子(它几乎从上到下拉伸(stretch)):当它像这样显示时,在View外部单击不会关闭它(尽管取消确实有效)。旋转回纵向使其恢复正常。此UIViewController中的所有约束都安装在所有大小类上。当调试viewDidAppear:中的值时,我看到以下内容:poself.view:frame=(00;250394)poself.preferredContentSize(width=250,height=160)是什么导致View

ios - X代码 4.5/iOS6 : orientation issue with my iPad app in Landscape mode

我刚刚在XCode4.5上打开了我的iPad项目。我的应用程序设计为在横向模式下运行。它在以前版本的XCode上完美运行。但是在XCode4.5上,它旋转了90°(四分之一圈),屏幕右侧有一个空白区域(我的View大小正确,但超出了屏幕)。它看起来像这样:我检查了以下帖子但没有帮助:orientationissueinios6ios6RotationissuefromlandscapetoportraitmodeSetorientationtolandscapemodeinxcode4.5GMIOS6有人遇到过这个问题吗?如有任何帮助,我们将不胜感激! 最佳

iOS7 iPad Landscape only app,使用 UIImagePickerController

我相信这是一个常见的问题,如果您使用的是iOS7且您的iPad应用程序仅为横向,但您想使用UIImagePickerController,则许多答案不再有效,许多只是部分答案使用源UIImagePickerControllerSourceTypePhotoLibrary或UIImagePickerControllerSourceTypeCamera。如何正确设置,使其100%正常工作?而且您不会获得混合方向并避免错误“支持的方向与应用程序没有共同的方向,并且shouldAutorotate返回YES”。 最佳答案 如果您的iPad应

ios - swift : Play Video in Landscape Mode When Fullscreen

我有这段代码:importUIKitimportMediaPlayerclassViewController:UIViewController{varmoviePlayer:MPMoviePlayerController!varbounds:CGRect=UIScreen.mainScreen().boundsoverridefuncviewDidLoad(){super.viewDidLoad()//Doanyadditionalsetupafterloadingtheview,typicallyfromanib.varwidth:CGFloat=bounds.size.widthv

安卓工作室 : Creating landscape layouts

直到最近我还在使用Eclipse,在Eclipse中我只是创建了一个文件夹/res/layout-landscape并在其中放置了替代的横向布局。但是,似乎在AndroidStudio1.1.0中,我不能那样做。如何为备用横向布局创建文件夹? 最佳答案 您实际上也可以在AndroidStudio中使用layout-land,它会显示在您的res目录中,如下所示:如果没有显示,请确保将您的项目范围设置为Project而不是Android。如果你仍然没有看到,你可以通过右键单击res目录并选择New->Android资源目录并填写下面的

安卓 : How to detect the image orientation (portrait or landscape) picked from gallery while setting on an imageview?

我正在从画廊(相机相册)挑选的ImageView上设置图像。如果拾取的图像具有横向方向,它会完美显示,但如果图像处于纵向模式(即在纵向模式下单击图像),它会以90度旋转显示图像。现在我试图在设置imageview之前找出方向,但所有图像都给出相同的方向和相同的宽度高度。这是我的代码:UriselectedImage=intent.getData();if(selectedImage!=null){Bitmapbitmap=MediaStore.Images.Media.getBitmap(this.getContentResolver(),selectedImage);intstr=n

android - 如何在 android 2.3.3 中使用 onConfigurationChanged() 和 newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE

我正在使用onConfigurationChanged()。其中,当我从LandScape更改为Portrait时,它正在调用if(newConfig.orientation==Configuration.ORIENTATION_PORTRAIT)并从LandScape转换为Portrait。但是当我从Portrait更改为Land-Scape时,它​​不会更改为LandScape,因为它正在调用if(newConfig.orientation==Configuration.ORIENTATION_LANDSCAPE)所以,它不会从LandScape更改为Portrait.请帮忙。pu

iphone - 横向模式仅适用于 iPhone 或 iPad

我想创建一个不使用纵向模式的应用程序。我不确定是否需要编辑plist或除plist之外还有代码 最佳答案 CodefoundhereLaunchinginLandscapeModeApplicationsiniPhoneOSnormallylaunchinportraitmodetomatchtheorientationoftheHomescreen.Ifyouhaveanapplicationthatrunsinbothportraitandlandscapemodes,yourapplicationshouldalwayslau

iphone - 横向模式仅适用于 iPhone 或 iPad

我想创建一个不使用纵向模式的应用程序。我不确定是否需要编辑plist或除plist之外还有代码 最佳答案 CodefoundhereLaunchinginLandscapeModeApplicationsiniPhoneOSnormallylaunchinportraitmodetomatchtheorientationoftheHomescreen.Ifyouhaveanapplicationthatrunsinbothportraitandlandscapemodes,yourapplicationshouldalwayslau