草庐IT

my_collection

全部标签

ios - 在 Collection View 中异步追加项目失败

我正在使用Alamofire构建类似pinterest的布局。然后我关注了uicollectionview-custom-layout-tutorial-pinterest在这里建立一个类似pinterest的布局。当我想用异步下载的照片实现它时,它失败了。Assertionfailurein-[UICollectionViewDatalayoutAttributesForItemAtIndexPath:]Alamofire.request(Unicooo.Router.ReadPostList("",["act_id":self.actId,"page":self.currentPa

ios - 在运行时更改 Collection View 单元格宽度

我正在创建一个EPG(电子节目指南);检索我使用JSON的程序信息。对于设计,我在左半部分有一个表格View用于channelLogo和名称,在右半部分有一个CollectionView用于该channel的所有电视节目。问题是对于每个节目,CollectionView行必须具有不同的宽度,这取决于节目的持续时间。我正在根据这个名为:EPGGrid的奇妙示例构建它但是在这个例子中,所有的channel都是预先加载到一个数组中的。如果channel列表很短,这很好用,但在我的例子中,列表非常大,所以我需要加载tableView:cellForRowAtIndexPath:中的每个chan

ios - 单网页的iOS App能否上传到App Store(**Note :my app contains only one screen** )

我需要一个应用程序通过URL的网页上传到AppStore(注意:我的应用程序只包含一个屏幕)。苹果是否允许将我的应用程序发布到AppStore。 最佳答案 和往常一样,答案是“视情况而定”。您的应用程序必须具有合理的功能。引用officialreviewguidelines:2.12Appsthatarenotveryuseful,unique,aresimplywebsitesbundledasApps,ordonotprovideanylastingentertainmentvaluemayberejected

ios - 我可以在 Collection View 中的后续单元格之间添加延迟并为每个单元格设置动画吗

我有一个CollectionView,我希望为其中的每个单元格设置动画,使每个单元格在前一个单元格显示后2秒出现在屏幕上。这可以通过添加延迟等简单方式实现吗? 最佳答案 你可以这样试试-(UICollectionViewCell*)collectionView:(UICollectionView*)collectionViewcellForItemAtIndexPath:(NSIndexPath*)indexPath{GalleryCell*cell=(GalleryCell*)[collectionViewdequeueReusa

ios - Collection View 错误 : must pass a valid reuse identifier

我正在尝试使用Storyboard中的UICollectionView原型(prototype)单元,就像我们对UITableView所做的那样。但是collectionView.dequeueReusableCellWithReuseIdentifier(:,forIndexPath:)应用程序崩溃并抛出错误***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'mustpassavalidreuseidentifierto-[UICollectionViewdequeueReusable

ios - 如何在单元格中调用图像 url 和 ImageView 以获取 Collection View 的索引路径功能

我想在CollectionView中异步分派(dispatch)8个图像url。我已经为CollectionView单元格创建了一个类,并且还在其中创建了一个imageview的导出。现在我想从主视图Controller配置ImageView。这是代码letreuseIdentifier="PhotosCollectionViewCell"//alsoenterthisstringasthecellidentifierinthestoryboardvaritems=["1","2","3","4","5","6","7","8"]//tellthecollectionviewhowma

ios - Collection View 单元格大小取决于 UITextView

我有一个UICollectionView和一个包含UITextView的Cell。我希望单元格的大小取决于TextView的高度(这样就不需要滚动并且所有文本始终可见)。我正在尝试这个:funccollectionView(collectionView:UICollectionView,layoutcollectionViewLayout:UICollectionViewLayout,sizeForItemAtIndexPathindexPath:NSIndexPath)->CGSize{if(indexPath.row然而它并没有真正起作用。有时高度太大,有时太小,我仍然需要滚动。

ios - AppStore 拒绝 : use of private calls refers to my own methods

我收到了以下拒绝信息:Yourappusesorreferencesthefollowingnon-publicAPIs:removeItems:,setSelectedSection:setIsNew:selectedSectionTheuseofnon-publicAPIsisnotpermittedontheAppStorebecauseitcanleadtoapooruserexperienceshouldtheseAPIschange.查看代码,我在XcodeCoreData代码生成器实现的一段代码中找到了removeItems:(我有一个名为items的子结构)。selec

ios - 如何从 UITableViewCell 上的自定义 Collection View 单元格推送 VC?

我有一个tableView和Cell,在Cell上我有一个collectionView并在上面显示一些内容。我想发送关于选择indexPath的链接。我想从TableViewCell上的自定义CollectionViewCell推送/呈现我的View。classsecondTopicTableViewCell:UITableViewCell{@IBOutletweakvarrelatedCustom:UICollectionView!varrelArray=NSArray()funcloadArray(arr:NSArray){self.relArray=arrself.related

ios - 表格 View 单元格中的独特 Collection View ,如 snapchat 故事

我想在我的tableview的最顶部包含一个可选的(有时有,有时没有)唯一View(这意味着它将与我的tableview一起滚动)。这个View可能会很复杂,因为它有自己的CollectionView。由于View会很复杂,我正在寻找一些建议或其他更好的方法来执行此操作,snapchat故事表具有此功能我看到的选项:使View成为最顶层的单元格让这个View成为标题(看起来不像它会缩放,例如如果我想要2个View或将它们放在表格中间的某个地方)也许将tableview放在ScrollView中,并在ScrollView中定义这个独特的View?我不喜欢这些选项的是:因为这个View是可