Xcode 6 GM iPhone 6 Simulator - Storyboards not sizing correctly, appear zoomed in

后端 未结 6 1216
孤城傲影
孤城傲影 2020-12-13 15:21

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 o

相关标签:
6条回答
  • 2020-12-13 15:32

    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

    0 讨论(0)
  • 2020-12-13 15:34

    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

    0 讨论(0)
  • 2020-12-13 15:36

    @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)

    0 讨论(0)
  • 2020-12-13 15:43

    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.

    0 讨论(0)
  • 2020-12-13 15:44

    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

    0 讨论(0)
  • 2020-12-13 15:55

    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.

    0 讨论(0)
提交回复
热议问题