gpt4 book ai didi

swift - xcode 8 实时预览无法正确预览

转载 作者:搜寻专家 更新时间:2023-10-31 21:47:18 24 4
gpt4 key购买 nike

我已经将 xcode 更新到最新版本 (V8.0)。
在之前的稳定版本中,实时预览部分准确地显示了应用程序在设备中的样子。
但是,在新版本中,实时预览部分会准确显示应用程序在界面生成器中的显示效果。

我怎样才能像以前一样进行实时预览?

任何想法将不胜感激。
提前致谢。

最佳答案

Xcode 8 的 Interface Builder 已经过彻底的重新设计。无法将其设置回 Xcode 7 的 Interface Builder。

您有两个选择。

要么你下载Xcode 7.3.1来自苹果开发者中心。但是您将失去使用 Swift 3 的能力。绝对不推荐此选项,因为您还将失去 future 的更新和 future 的新功能

或者您让自己熟悉新的 Interface Builder。 推荐该选项。 Apple 促销事件告诉您确切原因:

See a live preview of exactly how your app will appear on any Apple device with full vibrancy. As you quickly switch between different devices to customize your UI for size classes, you will always see the same interface as your customers. Pan and zoom are incredibly fast, and you can even edit your interfaces when fully zoomed out for a bird's eye view of your storyboard.

A Beginner’s Guide to Auto Layout with Xcode 8

我也可以建议你看看this thread .我对新的 Interface Builder 也有疑问。关键答案:将大 Storyboard分成许多小 Storyboard。并按照答案中的建议更新 Xcode 7 项目中的约束:

1) Remove only one of the "Height equals: xx" constraint from one of your views inside the cell. 2) Update all frames. 3) Select the view you removed constraint from. 4) Click to add new constraint button. Now it should be showing a new height, probably with a decimal value. 5) Add height constraint without changing the value inside the box.

但是将我的 Storyboard拆分成许多较小的 Storyboard就可以了。为您的应用程序的每个场景制作一个 Storyboard。喜欢登录。推文。图片。设置。

关于swift - xcode 8 实时预览无法正确预览,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40317669/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com