- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我有一个 UICollectionView
和 UICollectionViewFlowLayout
,其中包含许多项。由于用户输入,我想重新排序一个单元格。
[self.collectionView moveItemAtIndexPath:indexPath toIndexPath:newIndexPath];
执行此代码后, Collection View 不会在滚动时更新其内容。它不显示下一个单元格。它甚至不调用 cellForItemAtIndexPath:
但它的内容大小是正确的(布局“更新”它的状态)。因此我们只能看到在重新排序之前分布在 Collection View 上的单元格。任何线索可能是什么问题?此问题是否有任何已知的解决方法?该应用仅适用于 iOS 8, Collection View 与 UICollectionViewFlowLayout 一起使用。
编辑:当我调用 [self.collectionView reloadData];
时,数据源也没有被要求任何东西。
最佳答案
问题出在 UICollectionViewCell
上。高级描述是在移动动画期间从我的代码向单元格发送方法 actionForKey
。它导致单元格保持在内部 being animated
状态。我找不到合理的解决方法并重构了一些位以避免 actionForKey
调用。现在一切都按预期工作。
关于ios - UICollectionView 在 moveItemAtIndexPath :toIndexPath: 后停止加载单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27315973/
好的,我正在制作一个待办事项列表应用程序。我只是想知道如何正确使用 moveRowAtIndexPath:toIndexPath:,因为如果 toDoItemCompleted 方法被触发,它会一直崩
我有一个 UICollectionView 和 UICollectionViewFlowLayout,其中包含许多项。由于用户输入,我想重新排序一个单元格。 [self.collectionView
我在 Swift iOS 应用程序中有一个 tableView,它允许用户对行重新排序。点击“编辑”按钮,可以重新排序或删除行,然后再次点击“编辑”按钮(现在显示为“完成”)以完成该过程。 如果我只是
我正在尝试为 iOS 6 上的 UICollectionView 中的项目重新排序设置动画。 我写了这段代码: NSMutableDictionary *from = [NSMutableDi
我想使用 iOS 5 漂亮的行移动调用来为 TableView 设置动画以匹配某些模型状态更改,而不是旧式的删除和插入。 更改可能包括重新排序和就地更新,我想为两者设置动画,因此某些行将需要 relo
当使用 moveRowAtIndexPath:toIndexPath: 移动 UITableViewCell 时,我在使用 estimatedRowHeight 和 UITableViewAutoma
我是一名优秀的程序员,十分优秀!