无法呈现IB Designables的实例 [英] Failed to render instance of IB Designables

查看:180
本文介绍了无法呈现IB Designables的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Objective-C和Swift混合动态框架。混合框架与两个纯Objective-C动态框架相关联。

I have an Objective-C and Swift mixed dynamic framework. And the mixed framework was linked with two pure Objective-C dynamic frameworks.

当我尝试使用IB Designable标记混合框架中的任何类并在任一类中使用该类时故事板或笔尖,Xcode总是说它的实例无法呈现。

When I tried to mark any class in the mixed framework with IB Designable and using that class in either storyboard or nib, the Xcode always says the instance of it was failed to render.

并且出现了错误消息:


IB Designables:无法呈现WZUITokenField的实例:dlopen(WZUIKit.framework,1):未加载库:/ Library/Frameworks/WZFoundation.framework/WZFoundation
引用自:WZUIKit.framework
原因:图片未找到

IB Designables: Failed to render instance of WZUITokenField: dlopen(WZUIKit.framework, 1): Library not loaded: /Library/Frameworks/WZFoundation.framework/WZFoundation Referenced from: WZUIKit.framework Reason: image not found

IB Designables:无法更新自动布局状态:dlopen(WZUIKit.framework,1):未加载库:@ rpath / WZFoundation.framework / WZFoundation
引用自:WZUIKit.framework
原因:找不到图像

IB Designables: Failed to update auto layout status: dlopen(WZUIKit.framework, 1): Library not loaded: @rpath/WZFoundation.framework/WZFoundation Referenced from: WZUIKit.framework Reason: image not found

框架WZUIKit是Objective-C和Swift混合框架,WZFoundation是纯粹的Objec tive-C。

The framework WZUIKit is an Objective-C and Swift mixed framework and the WZFoundation is pure Objective-C.

另外,所有这些sutff都适用于任何设备或模拟器。

Plus, all these sutff work on either device or the simulator.

推荐答案

最后,我通过在目标的构建设置' Runpath搜索路径 $(CONFIGURATION_BUILD_DIR)解决了这个问题c $ c>字段。

Finally, I solved this issue by adding $(CONFIGURATION_BUILD_DIR) in the target's build settings' Runpath Search Paths field.

另外,您可能需要对Xcode执行一些额外步骤。

Plus, there are some additional steps you might need to do with your Xcode.


  1. 清除项目的Xcode派生数据。它们位于〜/ Library / Developer / Xcode / DerivedData

  2. 清理当前版本 K

  3. 构建项目

  4. 在故事板中转到编辑菜单并执行刷新所有视图;等待构建完成并且错误应该消失

  1. Clear Xcode derived data for the project. They are in ~/Library/Developer/Xcode/DerivedData
  2. Clean your current build by pressing K
  3. Build your project
  4. In storyboard go to Editor menu and do Refresh All Views; wait for build to be completed and errors should be gone

归功于@Mojtaba

这篇关于无法呈现IB Designables的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆