xcode11 新功能

WWDC 2019 is over and we can’t wait to discuss what’s in store for the developers. Today, we’ll be discussing the new features available in Xcode 11.

WWDC 2019已经结束,我们迫不及待地想要为开发人员讨论即将发布的产品。 今天,我们将讨论Xcode 11中可用的新功能。

Xcode 11 includes the support for Swift 5.1. Also, it includes SDKs for iOS 13, tvOS 13, watchOS 6, and macOS Catalina 10.15.

Xcode 11包括对Swift 5.1的支持。 此外,它还包括适用于iOS 13,tvOS 13,watchOS 6和macOS Catalina 10.15的SDK。

Xcode 11功能 (Xcode 11 Features)

Some of the XCode 11 features are:

XCode 11的一些功能包括:

  • SwiftUISwiftUI
  • Minimap小地图
  • Rich Documentation丰富的文档
  • Swift Package Manager迅捷软件包管理器
  • Inline Diff内联差异
  • Transform iPad Apps to Mac将iPad应用程序转换为Mac
  • Debugging and Simulators调试和模拟器

Let’s look into each of these one by one.

让我们逐一研究一下。

1. SwiftUI (1. SwiftUI)

SwiftUI is the big announcement this year. It’s a new framework introduced for easily creating layouts using swift code. Moreover, Xcode shows us a real app like interface viewer side by side while you edit the Swift file.
It requires a Declarative syntax which is easy to use Swift code. Adding animations and stuff is all very easy.

SwiftUI是今年的重要公告。 这是一个新框架,旨在使用快速代码轻松创建布局。 此外,当您编辑Swift文件时,Xcode并排显示了一个真正的应用程序,例如界面查看器。
它需要一种易于使用的Swift代码的声明式语法。 添加动画和内容非常容易。

Xcode 11 Swiftui

Xcode 11 Swiftui

This is a major shift from the Storyboards and drag and drop setup. The only issue:

这是从情节提要和拖放设置的重大转变。 唯一的问题:


Hence use it only if your app supports iOS 13 and above.
因此,仅当您的应用支持iOS 13及更高版本时才使用它。

To use SwiftUI, select the toolbox from the project setup window as shown below:

要使用SwiftUI,请从项目设置窗口中选择工具箱,如下所示:

Xcode Swiftui Setup

Xcode Swiftui安装程序

2.小​​地图 (2. Minimap)

Xcode has an awesome looking minimap of your code at the left. You can quickly go to a specific part of your code through it.

Xcode在左侧有一个很棒的代码迷你图。 您可以通过它快速进入代码的特定部分。

This feature was much needed and long awaited in Xcode since it was already available in many other editors like Atom etc.

由于Xcode已在许多其他编辑器(例如Atom等)中提供,因此在Xcode中非常需要此功能,并且期待已久。

Xcode 11 Minimap

Xcode 11小地图

3.丰富的文档 (3. Rich Documentation)

The documentation looks better in Xcode 11. The MARK keyword followed by a hyphen has a much bolder text which is clearly visible in the minimap as well.

该文档在Xcode 11中看起来更好MARK关键字后跟一个连字符,它的文本大胆得多,在小地图中也清晰可见。

Here’s a sneak peek into it:

这是一个简单的窥探:

Xcode11 Rich Documentation

Xcode11丰富的文档

4. Swift软件包管理器 (4. Swift Package Manager)

Up until now, to add third-party libraries or dependencies, we had to use Cocoapods or Carthage.

到目前为止,要添加第三方库或依赖项,我们必须使用Cocoapods或Carthage。

Xcode 11 introduces its own built-in package manager. Just go to files – Swift Packages and add a dependency by searching the package through the list of GitHub repositories.

Xcode 11引入了自己的内置包管理器。 只需转至文件– Swift Packages并通过在GitHub存储库列表中搜索该软件包来添加依赖项。

Xcode11 Swift Package Manager

Xcode11 Swift软件包管理器

Once you’ve added the dependency it will be shown at the bottom of your project in the left sidebar.

添加依赖项后,它将显示在项目底部的左侧边栏中。

5.内联差异 (5. Inline Diff)

Xcode 11 provides an improved UI to show changes in each line of code based on version control as shown below:

Xcode 11提供了一个改进的UI,以基于版本控制显示每行代码中的更改,如下所示:

Xcode11 Inline Diff

Xcode11内联差异

Clicking the blue bar at the left shows us options to discard changes or view the diff. Certainly, the diff feature is handy.

单击左侧的蓝色条会向我们显示放弃更改或查看差异的选项。 当然,差异功能很方便。

6.将iPad Apps转换为Mac (6. Transform iPad Apps to Mac)

With Xcode 11, it’s easy to port and run ipad apps on mac natively. You can do so by doing to the Project Navigator and selecting the relevant checkbox as shown below:

使用Xcode 11,很容易在Mac上本地移植和运行ipad应用程序。 您可以通过执行“项目导航器”并选择相关复选框,如下所示:

Xcode11 Ipadtomac

Xcode11的Ipadtomac

7.调试和模拟器 (7. Debugging and Simulators)

  • iOS Simulator speed has vastly improved in Xcode 11. They are now much faster thus removing the over-reliance of external devices for testing most of the stuff.iOS模拟器的速度在Xcode 11中得到了极大的提高,现在它们的速度要快得多,从而消除了对测试大多数内容的外部设备的依赖。
  • Starting XCode 11, you won’t have a simulator for every possible device but only for the commonly used devices. This saves a lot of disk space.从XCode 11开始,您将不会为所有可能的设备都配备模拟器,而只会为常用的设备配备模拟器。 这样可以节省大量磁盘空间。
  • Metal framework code can now be run and tested on iOS 13 and tvOS 13 simulators. They’ll use the Mac’s GPU.金属框架代码现在可以在iOS 13和tvOS 13模拟器上运行和测试。 他们将使用Mac的GPU。
  • You can now debug your application under simulated environments like low battery, thermal warnings, slow network.现在,您可以在电池电量不足,过热警告,网络速度缓慢等模拟环境下调试应用程序。
  • iOS 13 dark theme is a game changer. During debugging on iOS 13, we can switch between light and dark modes easily from our Xcode debugger.iOS 13黑暗主题将改变游戏规则。 在iOS 13上进行调试的过程中,我们可以通过Xcode调试器轻松在亮模式和暗模式之间切换。

That brings an end to this article on Xcode 11 features. If I have missed an important feature, please let me know through comments.

这结束了有关Xcode 11功能的本文。 如果我错过了重要功能,请通过评论告知我。

翻译自: https://www.journaldev.com/30976/xcode-11-features

xcode11 新功能

xcode11 新功能_Xcode 11功能相关推荐

  1. android p新功能_android 11 android的11大新功能

    android p新功能 In this article we will discuss about what android provides in new OS updates. And How ...

  2. CUDA 11功能清单

    CUDA 11功能清单 基于NVIDIA Ampere GPU架构的新型NVIDIA A100 GPU在加速计算方面实现了最大的飞跃.A100 GPU具有革命性的硬件功能,CUDA 11与A100一起 ...

  3. CUDA 11功能展示

    CUDA 11功能展示 CUDA 11 Features Revealed 新的NVIDIA A100 GPU基于NVIDIA安培GPU架构,实现了加速计算的最大一代飞跃.A100 GPU具有革命性的 ...

  4. 苹果iOS 16将改进通知 添加新的健康追踪功能

    4月11日消息,据国外媒体报道,代号为"Sydney"的iOS16将在6月的WWDC上推出预览版,分析师称,总体来说不会有太大的设计改变,主要将对通知和新健康追踪功能进行改进. 据 ...

  5. PostgreSQL 12:新功能和增强功能

    目录 介绍 新功能和增强功能 CTE增强 生成列 重新索引改进 默认情况下启用JIT编译 查询并行性改进 PL/pgSQL增强 SQL / JSON路径查询 分区改进 拼写改进 MCV统计信息现在支持 ...

  6. excel切片器显示错误_Office 2016中报表用户的新Excel切片器功能

    excel切片器显示错误 Whilst researching for the article Report filtering: Excel slicers vs SQL Server Report ...

  7. Android 11 功能和 API 概览

    Android 11 面向开发者引入了一些出色的新功能和 API.以下几部分内容可帮助您了解适用于您的应用的功能并开始使用相关 API. 有关新增.修改和移除的 API 的详细列表,请参阅 API 差 ...

  8. 如何看待微信新推的“圈子”功能?

    最近细心的用户可能已经发现,在微信的发现- 搜一搜页面,出现了一个带小红点提示的"圈子"入口. 今天我们就来聊聊微信新推的"圈子"功能. 有人可能会说,层级隐藏 ...

  9. newbee-mall 开源商城新计划:秒杀功能、优惠券、对接支付宝

    新项目是 newbee-mall 的升级版本,暂时就叫它 newbee-mall-plus 吧,第一阶段会开发秒杀功能.优惠券.对接支付宝这些功能,也会慢慢加入 Redis. Elastic Sear ...

最新文章

  1. 突破高连接性能瓶颈,图数据库在银行业这么用
  2. Redis根据是否存在设置值
  3. Python 下载的九种方法
  4. Servlet(自己实现的Servlet)细节
  5. 【超清视频】CCNA系列课程之二:IP地址介绍及VLSM子网划分
  6. javascript核心_javascript核心之DOM操作
  7. FL的萌新之路,开始了!
  8. CAN总线技术 | 物理层04 - 终端电阻与双绞线(特性阻抗120欧)
  9. sql 数据检索后的替换格式化
  10. SVN版本管理系统的使用(CentOS+Subversion+Apache+Jsvnadmin+TortoiseSVN)
  11. 专家系统是一种智能计算机软件系统,人工智能习题答案-第6篇-专家系统.pdf
  12. C#窗体-个人简历生成(自己设计并编写一个 Windows 应用程序,要求用到TextBox、GroupBox、RadioButton )
  13. 家庭生活保养保洁大全(化学保洁)
  14. 超高频RFID电子标签技术和应用分析
  15. 360企业版的IT管理价值
  16. Kafka:High level consumer vs. Low level consumer
  17. Webservice接口与HTTP接口学习笔记。
  18. C语言中struct typedef 以及结构体指针用法
  19. Linux一句话精彩问答--2007/10/23更新
  20. Java实现统计字符串中的字母和数字分别有多少个

热门文章

  1. PHP用301重定向根域名到www域名
  2. php提交字符串中有加号(+)时会后台得到空格的问题
  3. 流程平台:示例流程 - 主机申请审批流程
  4. 发一个招聘软件开发人员的帖子
  5. [转载] 【Python】Python3 List copy()方法
  6. [转载] python中chr和str,以及ordint
  7. Javaweb学习笔记——使用Jdom解析xml
  8. JS_模拟广告栏跟随效果
  9. [Leetcode][JAVA] Populating Next Right Pointers in Each Node II
  10. 浏览文件神器!且可以计算所有文件代码的行数!