纹理ASCollectionDataSourceInterop + Swift

时间:2017-12-06 14:12:29

标签: swift asyncdisplaykit

尝试使用ASCollectionDataSourceInteropUICollectionViewCellASCellNode合并到一个数据源中,如此处所述

  

http://texturegroup.org/docs/uicollectionviewinterop.html

但是我在这里遇到了问题,因为

func collectionView(_ collectionView: ASCollectionView, nodeForItemAt indexPath: IndexPath) -> ASCellNode {
        return nil
}

无法在swift中工作,也许有一种方法可以在swift

中解决

1 个答案:

答案 0 :(得分:1)

找到了解决方案:只需将返回类型设为隐式展开的可选:

a=df['index_vec'].str.strip("[] ").str.split(",").explode()
s=pd.crosstab(a.index,a).reindex_like(df).fillna(0)
df=df.add(a)

编译器会警告您类型不匹配,但一切正常