15.Xcode8 升级遇到的问题

一:注释快捷键cmd+/不能用,解决方法:

1. Swift_3.0 没法快捷键(command+/)注释的原因:这个是因为苹果解决xcode ghost,把插件屏蔽了。

2. 解决办法: 

(1) 终端输入: sudo /usr/libexec/xpccachectl . 需要输入电脑密码.

(2) 重启电脑

(3) 打开Xcode. Editor -> Sructure -> Add Documentation

二、Xib文件的注意事项

使用Xcode8打开xib文件后,会出现下图的提示。


QQ20160913-9.png-41.7kB


大家选择Choose Device即可。
之后大家会发现布局啊,frame乱了,只需要更新一下frame即可。如下图


QQ20160913-11.png-113.2kB
  • 注意:如果按上面的步骤操作后,在用Xcode7打开Xib会报一下错误,

QQ20160913-12.png-32.3kB
    • 解决办法:需要删除Xib里面
      <code class="xml" style="padding: 0px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;  border: none;"><span class="hljs-tag" style="color: rgb(0, 102, 102);"><<span class="hljs-title" style="color: rgb(38, 139, 210);">capability</span> <span class="hljs-attribute" style="color: rgb(181, 137, 0);">name</span>=<span class="hljs-value" style="color: rgb(42, 161, 152);">"documents saved in the Xcode 8 format"</span> <span class="hljs-attribute" style="color: rgb(181, 137, 0);">minToolsVersion</span>=<span class="hljs-value" style="color: rgb(42, 161, 152);">"8.0"</span>/></span></code>
      这句话,以及把< document >中的toolsVersion和< plugIn >中的version改成你正常的xib文件中的值
      ,不过不建议这么做,在Xcode8出来后,希望大家都快速上手,全员更新。这就跟Xcode5到Xcode6一样,有变动,但是还是要尽早学习,尽快适应哟!
原文地址:https://www.cnblogs.com/qiangzheVSruozhe/p/6076636.html