I am creating a UICollectionView with iOS 9 cool reorder function. I can make the cell still by returning No to the datasource function - (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPathfor this pointer path.
- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath
However, I found that the cell can be replaced with moving elements, which is not expected.
For example,
We cannot move the third element (screenshot).
But it can be the target index path to move another cell (screenshot).
Any good ideas so that the 3rd cell is really fixed?
Suppose an element in indexpath = {x, y} cannot be moved. Try using the following delegate method.
collectionView(_:targetIndexPathForMoveFromItemAtIndexPath:toProposedIndexPath:)
{x,y}, . Ex {x+1,y}
{x,y}
{x+1,y}
:
, , , . , . , .
Source: https://habr.com/ru/post/1624720/More articles:java.lang.NullPointerException: attempt to call the interface method 'OnColorChangeListener.colorChanged (java.lang.String)' in a reference to a null object - javaWhere can I find more information about the new syntax supported in google-style docstrings with the napoleon sphinx-doc extension? - pythonWhat is the main difference between ReactiveCocoa and PromiseKit? - promiseRaw code displayed in all php files - evalGetting information about the line number at the stage of semantic analysis (using Alex, Happy) - compiler-constructionHow to get all changes with a given topic from gerrit - gitHow to get the selected x axis value using MPAndroidChart? - androidHow to get the selected x-axis name (rows added to x-axis) using MP Chart? - androidHow to stop Wordpress.com from removing whitespace when copying? - formattingCNContact.imageData not working - cncontactAll Articles