jjzjj

photoInfo

全部标签

swift - didSelectItemAtIndexPath 未在 swift 中调用

我有CollectionView,其中包含ImageView和按钮在我点击imageViewdidSelectItemAtIndexPath的每个单元格中,当点击它不调用的按钮时调用这是代码overridefunccollectionView(collectionView:UICollectionView,cellForItemAtIndexPathindexPath:NSIndexPath)->UICollectionViewCell{letcell=collectionView.dequeueReusableCellWithReuseIdentifier(PhotoBrowserC

ios - 使用 Swift 的 Alamofire - "Could not cast value of type ' Swift._SwiftDeferredNSArray' (ox10a75ebb0) 到 'Photomania.PhotoInfo' (0x107ee7b90)。”

运行OSXElCap开发测试版、iOS9.0、Xcode7.0GM我正在关注RayWenderlich教程(http://www.raywenderlich.com/85080/beginning-alamofire-tutorial),但确实遇到了一些问题。在我创建请求路由器之前,我的应用程序无法运行。它构建正确,然后一旦开始加载,我就会在标题中看到调试器短语。构建错误描述为“Thread1:signalSIGABRT”。概述的行是:letimageURL=(photos.objectAtIndex(indexPath.row)as!PhotoInfo).url这是PhotoBrow