【发布时间】:2014-09-08 02:20:38
【问题描述】:
这行代码阻止了我的项目的构建:
var allAttributes: [UICollectionViewLayoutAttributes] = []
我尝试了var allAttributes = [UICollectionViewLayoutAttributes](),但它也无法构建。
以下是错误详情:
Apple Mach-O Linker Error:
Undefined symbols for architecture i386:
"__TFSs15_arrayForceCastU___FGSaQ__GSaQ0__", referenced from: __TFC42com_myname...30ClassWhereCodeIs33layoutAttributesForElementsInRectfS0_FVSC6CGRectGSqGSaPSs9AnyObject___ in ClassWhereCodeIs.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
初始化数组以便我可以附加对象来填充它的正确方法是什么?
【问题讨论】:
标签: ios arrays swift initialization