ChenYilong / ChenYilong/iOS11AdaptationTips

iOS11开发新特性之Xcode9 新特性

Open
#23 11 comments 0 reactions 0 assignees View on GitHub
note
Dominant language
No language data
Stars
477
Forks
47
PR merge metrics
No merged PRs in 30d

Description

# iOS11开发新特性之Xcode9 新特性

## 功能更全的 Git 支持

在Xcode 9 中,引入了 GitHub 新源代码管理导航器 可以展示 branch 分支和 tag 标签。
![](https://ws3.sinaimg.cn/large/006tNc79gy1fjxzs2l0uej31kw11nk8q.jpg)

双击对应 commit
![](https://ws1.sinaimg.cn/large/006tNc79gy1fjxzzngwxxj30rs0hbwno.jpg)

可以直接查看本次提交。

本次覆盖,基本涵盖 GitHub 官方客户端功能。

## 创建新的颜色 asset catalog

创建新的颜色 asset catalog

通常我们会New image set, 现在 可以New color set . 然后填充 rgb alpha 值

在 xcassets 里添加颜色,
![](https://ws3.sinaimg.cn/large/006tKfTcgy1fjolad575yj30z50fe74h.jpg)

在代码或者 IB 中直接引用该颜色:
![](https://ws1.sinaimg.cn/large/006tKfTcgy1fjolacwv7rj30kk04taa2.jpg)

功能类似开发工具【Zeplin For Mac:生成自定义颜色代码,支持Objective-C和Swift】开发中,每个App都有自己的特有的颜色。比如马尔代夫蓝、屎黄色。。我们通常使用分类为颜色起名,比如[UIColor cyl_sunYellowColor]。Zeplin能选取Sketch文件中的颜色并导出分类,代码可自定义前缀: [Zeplin For Mac](https://zeplin.io)

对于有设置主题色的 APP 非常有用。

## 设置

Xcode 9 有个选项可以关闭 Command + Click 的弹层,选择之后就可以跟之前版本一样直接进行跳转

选择 jump to definition:

![](https://ws4.sinaimg.cn/large/006tNc79gy1fjxzs0tjmhj31eo0sodq7.jpg)

无线调试

对 Folder 管理也有加强(现在你删掉一个 Folder,文件系统里的那个也会被真的删掉)。
Xcode 终于解决了 Group/Folder 混乱的问题,从此 Group 默认就是 Folder。 ​​​​

![](https://ws4.sinaimg.cn/large/006tKfTcgy1fjq4wge6ebj30dm0mut9f.jpg)

增加了主线程 API 检查,Test 可以在模拟器并行进行,无线调试

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.