您的位置:首页 > 大数据 > 人工智能

IBDesignable Errors Failed to update auto layout status:……

2015-08-27 11:42 525 查看
特别提醒:改Podfile之前请先仔细看下文,你遇到的问题是否和我一致,因为貌似有很多其他的问题也会有相似的报错

我的环境 Xcode 7 Beta 6 ;CocoaPods 0.38.2 

——————2015/08/28更新————————————

解决方法是在 Podfile中添加

use_framework!

比方说:

platform :ios, '7.0'
use_frameworks!
#Framework
pod 'SVPullToRefresh', '~> 0.4.1'
pod 'JDStatusBarNotification', '~> 1.5.2'

——————————————————————————————————
PS:使用 use_frameworks! 之后可能会遇到签名问题,需要一个个去修改还是比较蛋疼的。

今天用动态渲染遇到 IBDesignable Errors Failed to update auto layout status:……的问题

一开始提示如下……



然后我 clean了一下, 进windows->project 把 Deriverd Data 删除了,之后就变成下面这幅模样



每次报的错都不一样,然后我就进 storyboard的 Source Code模式看了一下



发现没错,保存退出,重进Interface Builder……神奇的事情发生了,没错误了。

猜测可能是Xcode 6.4的 bug

——————2015/08/28更新————————————

解决方法是在 Podfile中添加

use_framework!

比方说:

platform :ios, '7.0'
use_frameworks!
#Framework
pod 'SVPullToRefresh', '~> 0.4.1'
pod 'JDStatusBarNotification', '~> 1.5.2'

原因分析:

因为发现和Xcode 6.4没有关系,我更新了Xcode 7 Beta 问题依旧,然后我发现如下帖子
http://stackoverflow.com/questions/28391112/interface-builder-failed-to-load-designables-from-path-null/
帖子如下(我把重要的地方用红色突出了):

问题:

I have some custom controls I have created and I'm them using in a new project. However, I keep getting errors in interface builder:
Failed to update auto layout status: Failed to load designables from path (null)


or
Failed to render instance of <control>: Failed to load designables from path (null)


I've tested out the controls in another project and they seem to render correctly in interface builder, but I cannot get them to work in the current project. What causes this error and how might I fix it?

Thanks in advance...

回答:
Does your project use CocoaPods? –  N1ghtshade3 Mar
9 at 16:04
 
@N1ghtshade3 I'm having the same problem, and the control I'm having issue with is not from a CocoaPods dependency. –  Josh
Brown Mar
9 at 17:38
  
I am not using CocoaPods either, but I have seen the CocoaPods related post. I think CocoaPods has found a solution
to this issue, but unfortunately I can't find it anywhere! –  Jake Mar
10 at 0:23
  
are you loading any images using imageNamed(:) –  Daniel
Galasko Mar
11 at 13:37
  
take a look at github.com/CocoaPods/CocoaPods/issues/2792 and stackoverflow.com/questions/28204108/… –  Mehul
Thakkar Mar
15 at 16:32 

然后我在 github.com/CocoaPods/CocoaPods/issues/2792 上看到了如下回复

segiddins commented on
Nov 27, 2014

This requires frameworks support, which will be added in #2835.

这是#2835的网址:https://github.com/CocoaPods/CocoaPods/pull/2835
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: