本文介绍了如何在Xcode的情节提要中显示状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个顶部具有导航控制器的应用程序.以iPhone 7 Plus形式在情节提要板上查看该应用程序时,状态栏可见,布局正确.当以任何其他设备查看时,状态栏会丢失,并且布局会偏离20像素.我还会收到放错位置"的警告.

I'm trying to develop an app that has a navigation controller at the top. When viewing the app on the storyboard as an iPhone 7 Plus, the status bar is visible, and the layout is correct. When viewing as any other device, the status bar is missing, and the layout is off by 20px. I also get a "misplaced view" warning.

我认为这与在工作计算机上进行开发时出现的问题有关,但是当我切换到笔记本电脑时,放错位置的视图"错误开始发生.

I believe this has to do with the issue working while developing on my work computer, but then when I switch to my laptop, the Misplaced View errors start happening.

运行该应用程序时,无论使用哪种设备,该应用程序都可以正常运行并且外观应为应有的状态,但是由于所有此类问题,开发起来都很困难.

When running the app, the app works fine and looks as it should regardless of the device, but with everything off like this, it's hard to develop.

我是否更改了笔记本电脑上的某些默认设置,以便在情节提要视图中的某些视图上不显示状态栏?感谢您的帮助!

Did I change some default setting on my laptop to not show the status bar on some views in the storyboard view? Thanks for any help!

iPhone 7示例在情节提要视图中没有显示状态栏,并且单元格位置不正确/观看次数/图像

更新:在工作中(不同的Mac在运行具有相同项目文件的Xcode时,状态栏显示必须在我的Xcode家里设置一些东西.

Update: At work (different Mac running Xcode with the same project files, the status bar shows on every preview (meaning no misplaced views). It's got to be something with my Xcode settings at home. Any ideas?

推荐答案

在Mac上卸载并重新安装Xcode似乎可以解决该问题.我确定这是一个错误.

Uninstalling and reinstalling Xcode on the mac with the issue seemed to solve the problem. I'm sure it's a bug.

这篇关于如何在Xcode的情节提要中显示状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 08:33