如何使用Xcode和模拟器进行全屏开发

While developing apps, it’s important to create a focus so you can get into the flow and speed up development. Full-screen mode can help keep you focused without any distractions from other apps.

在开发应用程序时,创建焦点非常重要,这样您就可以进入流程并加快开发速度。 全屏模式可以帮助您保持专注,而不会干扰其他应用程序。

Up until Xcode 12 full-screen support was hidden behind a user defaults flag. With the latest version of Xcode, we can now simply make use of mission control to enter a focused way of developing apps.

直到Xcode 12全屏支持被隐藏在用户默认标志的后面。 使用最新版本的Xcode,我们现在可以简单地利用任务控制进入开发应用程序的集中方式。

并排使用Xcode和模拟器进入全屏模式 (Entering Full-Screen Mode With Xcode and the Simulator Side by Side)

Full-screen mode looks as follows and is a great way to keep your focus on writing code and developing apps:

全屏模式如下所示,是保持专注于编写代码和开发应用程序的好方法:

Developing with Xcode and the Simulator in full-screen mode
Developing with Xcode and the Simulator in full-screen mode
在全屏模式下使用Xcode和Simulator进行开发

As you can see, the only thing visible is Xcode on the left and the Simulator on the right. It’s a focused environment, without the dock or menubar visible — which may cause distraction.

如您所见,唯一可见的是左侧的Xcode和右侧的Simulator。 这是一个重点突出的环境,没有可见的基座或菜单栏,这可能会分散注意力。

To enter this mode, you have to start with moving Xcode into full-screen mode and follow the upcoming steps:

要进入此模式,您必须先将Xcode移至全屏模式,然后执行接下来的步骤:

  • Enter full-screen with Xcode by clicking the green button on the traffic light in the top left or by using the shortcut ⌃ CTRL + ⌘ CMD + F

    通过单击左上方交通信号灯上的绿色按钮或使用快捷键⌃ CTRL + ⌘ CMD + F进入Xcode全屏显示

  • Make sure the Simulator window is open, and open mission control by tapping the F3 key

    确保“模拟器”窗口已打开,并通过按F3键打开任务控制

  • Drag the simulator window, and drop it next to Xcode

    将模拟器窗口拖放到Xcode旁边

That’s all! This is all demonstrated in a video I put together (available on the original version of this article).

就这样! 我整理的视频中对此进行了全部演示( 可在本文的原始版本中获得 )。

在旧版本的Xcode中使用全屏模式 (Using Full-Screen Mode in Older Versions of Xcode)

Trying the above scenario with an older version of Xcode would result in a blocking symbol:

在较旧版本的Xcode上尝试上述情况将导致阻塞符号:

Full-screen mode is not supported by default on Xcode 11 and older
Full-screen mode isn’t supported by default on Xcode 11 and older
Xcode 11和更早版本默认不支持全屏模式

We can solve this by executing the following command in the terminal:

我们可以通过在终端中执行以下命令来解决此问题:

defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES

Make sure to restart the Simulator if it was open, and you should be good to go to work in full-screen mode on Xcode 11.

如果已打开模拟器,请确保将其重新启动,并且最好在Xcode 11上以全屏模式工作。

结论 (Conclusion)

Staying focused is a skill on its own. It’s already challenging to write good quality code, so anything that helps us improve writing it is more than welcome. By using Xcode and the Simulator in full-screen mode, we take away possible distractions and allow ourselves to get into a flow.

保持专注是一种技巧。 编写高质量的代码已经具有挑战性,因此任何能帮助我们改进编写代码的事物都将受到欢迎。 通过在全屏模式下使用Xcode和Simulator,我们消除了可能的干扰,并让自己参与其中。

Thanks!

谢谢!

翻译自: https://medium.com/better-programming/how-to-do-full-screen-development-with-xcode-and-the-simulator-b524bef01563

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值