在我第一次体验CocoaPods时,我遇到了一个问题。我在现有项目中使用CocoaPods专门为DTAttributedLabel安装DTCoreText。一切顺利,似乎工作正常,但第二个我包括DTCoreText.h我得到CoreText框架的多个错误,如下所示:
CoreText.framework/Headers/CTRunDelegate.h:130:16: Expected member name or ';' after declaration specifiers
typedef struct
{
CFIndex version;
CTRunDelegateDeallocateCallback dealloc;
CTRunDelegateGetAscentCallback getAscent;
CTRunDelegateGetDescentCallback getDescent;
CTRunDelegateGetWidthCallback getWidth;
} CTRunDelegateCallbacks;
CoreText.framework/Headers/SFNTLayoutTypes.h:821:23: Expected member name or ';' after declaration specifiers
struct LcarCaretTable {
Fixed version;
UInt16 format;
SFNTLookupTable lookup;
};
我创建了一个单独的视图项目,只是为了检查我的安装技术,并且能够正常使用DTCoreText。
答案 0 :(得分:0)
我通过创建一个新项目并通过Cocoapods安装所有依赖项解决了这个问题。看来这个问题与冲突有关。