我在我的应用程序中同时使用了swift和objective-c。将NSArray的内容添加到Swift数组
我有一个CustomClass,我想为该类创建一个swift数组,并从我的名为oldClass的objective-c类中添加内容,该类中包含一个名为arrayOfCustomClass的NSArray中的这些对象的数组。
var newArray = [CustomClass]()
newArray += oldClass.arrayOfCustomClass
这将导致一个错误:
'[(CustomClass)]' is not identical to 'CGFloat'
任何帮助吗? 谢谢 Reza
显示其余的实际代码!什么是'oldClass'?什么是'arrayOfCustomClass'? – matt 2014-09-25 15:27:23