Xcode 6 GM iPhone 6 Simulator - Storyboards not si

2019-01-21 23:22发布

I'm using the new Xcode 6 GM Seed and testing my app on the iPhone 6 and iPhone 6 Plus simulators. I'm getting a strange effect on some projects I was previously working on, namely that the views seem to be getting a "zoom in" effect.

Here's an example. Both these view controller's are exactly the same (minus the different navigation item text), down to the label text size. However, you can see that the views appear different.

zoomed

normal

Note that the project with the weird zoom effect has a deployment target of 8.0.

Note: I got the normal looking one to work by making the project in the new Xcode 6 GM Seed (the projects that aren't working were made on older versions of Xcode).

6条回答
beautiful°
2楼-- · 2019-01-22 00:01

This is the default and this is how all existing apps will work on the new iPhones - they will be "zoomed".

To make an app that actually uses the extra screen size you must, like with the 4" iPhones, add specific launch images specific to the two iPhone 6's.

If you are using asset catalogs, go to the LaunchImages asset catalog and add the new launch images for the two new iPhones. You may need to right-click and choose "Add New Launch Image" to see a place to add the new images.

In addition, using a Launch Screen xib file instead of images solves this problem right away and it's the recommended way moving forward. Here are the steps to add a Launch Screen to your app: https://stackoverflow.com/a/25763870/422288

查看更多
Emotional °昔
3楼-- · 2019-01-22 00:10

most of what @rmaddy said works, but when I goto the Images.xcassets to configure the LaunchImage, I just select the "LaunchImage", and select "Attributes inspector", in the inspector page, you will see the corresponding configure choices, the steps also works for App Icons

查看更多
看我几分像从前
4楼-- · 2019-01-22 00:13

For me what solved the problem is:

I had to click on both the project and the target and change the targeted device family to point to not just iphone, but also iPads. Only then the magnified zoom went away

enter image description here

查看更多
一纸荒年 Trace。
5楼-- · 2019-01-22 00:14

It doesn’t look like Apple updated the docs yet for the new launch image sizes, but you can find them from Xcode. If you add the new launch images as Maddy says, you can view the new sizes in the inspector panel. iOS 8 includes three new images and does not require different images if the Status Bar is hidden on launch. The sizes are:

iOS 8 iPhone Portrait
Retina HD 5.5  1242x2208
Retina HD 4.7  750x1334

iOS 8 Landscape
Retina HD 5.5  2208x1242

You can add them in Xcode or edit the json file in the .xcassets file and drop the images into the package. If you choose to edit the package, add these lines to the top of the file:

{
      "extent" : "full-screen",
      "idiom" : "iphone",
      "subtype" : "736h",
      "filename" : "Default-736h@3x.png",
      "minimum-system-version" : "8.0",
      "orientation" : "portrait",
      "scale" : "3x"
    },
    {
      "extent" : "full-screen",
      "idiom" : "iphone",
      "subtype" : "736h",
      "filename" : "Default-Landscape@3x.png",
      "minimum-system-version" : "8.0",
      "orientation" : "landscape",
      "scale" : "3x"
    },
    {
      "extent" : "full-screen",
      "idiom" : "iphone",
      "subtype" : "667h",
      "filename" : "Default-667h@2x.png",
      "minimum-system-version" : "8.0",
      "orientation" : "portrait",
      "scale" : "2x"
    }

I kept the naming convention they used before for the portrait files. There was never a landscape option on phones before, so I kept the naming convention for iPads. Of course, you can name them anything you want.

Edit: Note that the only phone that will launch in landscape mode is the iPhone 6 Plus. The rest of the phones will only launch in portrait mode.

查看更多
别忘想泡老子
6楼-- · 2019-01-22 00:18

@JScarry, your solution is ok, but doesnt allow to show landscape image on iPhone 6. Here is a solution that works (it requires both landscape and portrait images to be in the same dimension 350x667, landscape image should be just rotated)

查看更多
ら.Afraid
7楼-- · 2019-01-22 00:19

Adding Launch Image does not solve this problem.

You need to add LaunchScreen.xib into the project and add Launch screen interface file base name - LaunchScreen to Info.plist

Create a new project with Xcode 6 GM. You will see what LaunchScreen.xib is. You can copy it into your existing project.

查看更多
登录 后发表回答