草庐IT

indexpath

全部标签

iphone - 附件 Action segue (UITableViewController)

我正在尝试通过IB进行segue,即在tableView中按下单元格附件时切换View。来self的IB的图片:1.我从tableviewcontroller的单元格拖到另一个View并选择AccessoryAction->push当我运行我的项目时出现错误:[setValue:forUndefinedKey:]:thisclassisnotkeyvaluecoding-compliantforthekeyaccessoryActionSegueTemplate我认为这可能是cell的reuseIdentifier有问题。我的cellForRowAtIndexPath:方法:stati

ios - UICollectionview 单元格选择

我制作了一个图像网格,为了显示它的选择,我在选择时为图像绘制了边框。但问题是当我在顶部选择一些图像并向下滚动图像网格时,似乎也选择了底部的其他图像。下面是我的代码片段:UINib*cellNib=[UINibnibWithNibName:@"collectionCell"bundle:nil];[self.collectionViewregisterNib:cellNibforCellWithReuseIdentifier:@"cellCV"];UICollectionViewFlowLayout*flowLayout=[[UICollectionViewFlowLayoutalloc

ios - UICollectionview 单元格选择

我制作了一个图像网格,为了显示它的选择,我在选择时为图像绘制了边框。但问题是当我在顶部选择一些图像并向下滚动图像网格时,似乎也选择了底部的其他图像。下面是我的代码片段:UINib*cellNib=[UINibnibWithNibName:@"collectionCell"bundle:nil];[self.collectionViewregisterNib:cellNibforCellWithReuseIdentifier:@"cellCV"];UICollectionViewFlowLayout*flowLayout=[[UICollectionViewFlowLayoutalloc

ios - 在 UICollectionView 中创建慢速滚动到 indexPath

我正在开展一个项目,我在其中使用UICollectionView创建一个“图像自动收报机”,我在其中为一系列Logo做广告。collectionView高1项,长12项,一次显示两到三个项目(取决于可见Logo的大小)。我想制作一个从第一项到最后一项的缓慢自动滚动动画,然后重复。有没有人能做到这一点?我可以让滚动工作使用[myCollectionscrollToItemAtIndexPath:[NSIndexPathindexPathForRow:(myImages.count-1)inSection:0]atScrollPosition:UICollectionViewScrollP

ios - 在 UICollectionView 中创建慢速滚动到 indexPath

我正在开展一个项目,我在其中使用UICollectionView创建一个“图像自动收报机”,我在其中为一系列Logo做广告。collectionView高1项,长12项,一次显示两到三个项目(取决于可见Logo的大小)。我想制作一个从第一项到最后一项的缓慢自动滚动动画,然后重复。有没有人能做到这一点?我可以让滚动工作使用[myCollectionscrollToItemAtIndexPath:[NSIndexPathindexPathForRow:(myImages.count-1)inSection:0]atScrollPosition:UICollectionViewScrollP

ios - 解析取消固定不会从本地数据存储中删除对象

这应该有效。这是解决这个问题的众多尝试之一myTrainingSessions[indexPath.row].unpinInBackgroundWithBlock{(succ,e)->Voidinifsucc==true{//justremovefromtableviewetcself.myTrainingSessions[indexPath.row].deleteEventually()self.myTrainingSessions.removeAtIndex(indexPath.row)self.tableView.deleteRowsAtIndexPaths([indexPath

ios - 解析取消固定不会从本地数据存储中删除对象

这应该有效。这是解决这个问题的众多尝试之一myTrainingSessions[indexPath.row].unpinInBackgroundWithBlock{(succ,e)->Voidinifsucc==true{//justremovefromtableviewetcself.myTrainingSessions[indexPath.row].deleteEventually()self.myTrainingSessions.removeAtIndex(indexPath.row)self.tableView.deleteRowsAtIndexPaths([indexPath

ios - 如何从 UICollectionViewCell 访问 UICollectionView 中 Cell 的 indexPath

我想在调用操作时为UICollectionViewCell设置动画。我在InterfaceBuilder中完成了UICollectionViewCell,UICollectionView也完成了。现在我想在我的actionBtnAddToCard方法中获得正确的indexPath。这就是我现在尝试的方式(ProduktViewCell.m中的方法):-(IBAction)actionAddToCart:(id)sender{XLog(@"");//seethislineNSIndexPath*indexPath=??**howcaniaccessthecorrectindexPath*

ios - 如何从 UICollectionViewCell 访问 UICollectionView 中 Cell 的 indexPath

我想在调用操作时为UICollectionViewCell设置动画。我在InterfaceBuilder中完成了UICollectionViewCell,UICollectionView也完成了。现在我想在我的actionBtnAddToCard方法中获得正确的indexPath。这就是我现在尝试的方式(ProduktViewCell.m中的方法):-(IBAction)actionAddToCart:(id)sender{XLog(@"");//seethislineNSIndexPath*indexPath=??**howcaniaccessthecorrectindexPath*

ios - 手动调用 didSelectRowatIndexPath

我正在尝试以编程方式调用didSelectRowAtIndexPath,但遇到了问题。[selftableView:playListTbldidSelectRowAtIndexPath:indexPath];给我以下错误:Useofundeclaredidentifier'indexPath';didyoumean'NSIndexPath'?有人能帮帮我吗?谢谢!编辑:从下面的回复来看,我似乎以错误的方式处理这件事。如何在按下按钮时获取所选项目的文本(可以多选)?我需要在专用于按钮按下的功能中执行此操作。 最佳答案 你需要传递一个有