IBDesignable Errors Failed to update auto layout status:……

特别提醒:改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:……的问题

一开始提示如下……

IBDesignable Errors Failed to update auto layout status:……_第1张图片

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

IBDesignable Errors Failed to update auto layout status:……_第2张图片

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

IBDesignable Errors Failed to update auto layout status:……_第3张图片

发现没错,保存退出,重进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 : 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...




然后我在  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


你可能感兴趣的:(Objective-C,tips)