简体   繁体   English

使iPhone专用的应用程序在iPad上运行

[英]Make iPhone specific App work on iPad

When Creating my iPhone specific game it works fine on all iPhone screens (iPhone 5-iPhone 7+) 在创建我的iPhone专用游戏时,它可以在所有iPhone屏幕上正常运行(iPhone 5-iPhone 7+)

I submitted the app to the app store but Apple have rejected it saying that some scenes were crowded and not displaying correctly. 我已将应用程序提交给应用程序商店,但苹果公司拒绝了它,说某些场景很拥挤且无法正确显示。

On iPhone: 在iPhone上: 在此处输入图片说明 Notice that all button are displayed on screen. 注意所有按钮都显示在屏幕上。

Whilst on iPad Air: 在iPad Air上: 在此处输入图片说明

I am completely stuck on what to do. 我完全束手无策。 I have set the App to iPhone Specific on xCode so why is is displaying differently? 我已在xCode上将“应用程序”设置为“ iPhone专用”,为什么显示方式有所不同?

My Scenes are 1334 x 750px which is the default for iPhone 6+ in Landscape mode. 我的场景为1334 x 750像素,这是横向模式下iPhone 6+的默认设置。

If your app has Only iPhone device support not universal, And app is correctly designed for all iPhones it should work with iPad as well with @1x and @2x mode 如果您的应用程序仅具有非iPhone设备支持,并且该应用程序是为所有iPhone设计的,那么它应该可以在iPad上使用@ 1x和@ 2x模式

iPad normally takes the design of iPhone 4 to render on screen ie 320x480, and you supported iPhone 5-iPhone 7+ it is not rendering on iPad devices. iPad通常采用iPhone 4的设计在屏幕上渲染,即320x480,而您支持的iPhone 5-iPhone 7+则不能在iPad设备上渲染。

So you should give support your design for 320 x 480 or iPhone 4 as well. 因此,您也应该支持320 x 480或iPhone 4的设计。

Update 更新资料

An easy option is Embed your current view within scroll view and make is scrollable only with height 480. 一个简单的选项是将当前视图嵌入滚动视图,并使make仅在高度为480时滚动。

Add a ScrollView just below your viewcontroller root view and all existing subviews within scroll view and make it scrollable with device height 480 (also set content size manually or automatically) 在您的viewcontroller根视图和滚动视图内的所有现有子视图的下方添加一个ScrollView,并使其在设备高度480下可滚动(也可以手动或自动设置内容大小)

我似乎通过将场景从.aspectFill更改为.aspectFit来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM