ibireme / YYText

Powerful text framework for iOS to display and edit rich text.
MIT License
8.84k stars 1.68k forks source link

在storyboard中一引用就报错,但是能正常运行,有没有解决方案呢? #541

Open Corotata opened 7 years ago

Corotata commented 7 years ago

58d56249-d1b6-4929-b30b-d1fecc39a112

developforapple commented 7 years ago

把 YYLabel.h 第336行 IB_DESIGNABLE 注释掉就可以了。 YYTextView同理。

这应该是storyboard的一个bug

mdsb100 commented 6 years ago

TTTAttributedLabel includes IBInspectable and IB_DESIGNABLE annotations to enable configuring the label inside Interface Builder. However, if you see these warnings when building...

IB Designables: Failed to update auto layout status: Failed to load designables from path (null) IB Designables: Failed to render instance of TTTAttributedLabel: Failed to load designables from path (null) ...then you are likely using TTTAttributedLabel as a static library, which does not support IB annotations. Some workarounds include:

Install TTTAttributedLabel as a dynamic framework using CocoaPods with use_frameworks! in your Podfile, or with Carthage Install TTTAttributedLabel by dragging its source files to your project

copy from TTTAttributedLabel