草庐IT

some_collection

全部标签

vue2/3 - 报错You may use special comments to disable some warnings.(// eslint-disable-next-line解决方法教程)

错误提示在vue2/3项目开发中,运行或打包时出现如下报错信息,提供详细解决方法。oumayusespecialcommentstodisablesomewarnings.Use//eslint-disable-next-linetoignorethenextline.Use/eslint-disabletoignoreallwarningsinafile.只要你和我一样报错,就可以解决掉这个问题!解决教程其实,

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 - 我可以在 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 - 如何从 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是可

iOS,带有 Collection View 的自定义键盘,约束问题

我正在尝试为iOS创建一个自定义键盘,其中包括一个带有图像的CollectionView。目前我正在尝试没有Storyboard(Storyboard有几个问题并且不容易描述)。所以我只是添加“nextKeyboardButton”(在XCode上添加新目标时默认出现),然后添加另一个按钮(切换UICollectionViewCell上的图标类型,最后是UICollectionView.我的代码:classKeyboardViewController:UIInputViewController,UICollectionViewDelegateFlowLayout,UICollectio