Git Product home page Git Product logo

uicollectionview-reordering's Introduction

uicollectionview-reordering's People

Contributors

mmatoszko avatar rakaramos avatar wojteklu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uicollectionview-reordering's Issues

Reordering changes when drag state begins

For the first time when we reorder, the code works fine. But if we try to reorder it again, the dimensions of the collection view cell changes automatically thus giving a very unstable ordering. I'm experiencing it in iOS 9.3. Also this is the case in ThirdViewController.swift file.

cancelInteractiveMovement() seems broken

Cells should return to original positions, but some are missing or inconsistent with model. This seems to be on Apple's end; can you confirm?
To reproduce: call cancelInteractiveMovement() on gesture .Ended instead of endInteractiveMovement(). Wrapping in performBatchUpdates w/ reload in completion almost fixes, but not quite always.

crash

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2015-09-19 15:18:24.524 Example[32028:1966216] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2015-09-19 15:18:25.002 Example[32028:1966216] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2015-09-19 15:18:25.755 Example[32028:1966216] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2015-09-19 15:18:26.843 Example[32028:1966216] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2015-09-19 15:18:28.773 Example[32028:1966216] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[**NSArrayM objectAtIndex:]: index 18446744073709551615 beyond bounds [0 .. 100]'
* First throw call stack:
(
0 CoreFoundation 0x00000001092c1f65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010b178deb objc_exception_throw + 48
2 CoreFoundation 0x00000001091a5a94 -[__NSArrayM objectAtIndex:] + 212
3 Example 0x00000001090b6b3c TFC7Example32CHTCollectionViewWaterfallLayout34layoutAttributesForItemAtIndexPathfS0_FCSo11NSIndexPathGSqCSo32UICollectionViewLayoutAttributes + 748
4 Example 0x00000001090b6cba TToFC7Example32CHTCollectionViewWaterfallLayout34layoutAttributesForItemAtIndexPathfS0_FCSo11NSIndexPathGSqCSo32UICollectionViewLayoutAttributes + 58
5 UIKit 0x000000010a562cf0 -[UICollectionViewData layoutAttributesForItemAtIndexPath:] + 315
6 UIKit 0x000000010a51a1ae -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:] + 351
7 UIKit 0x000000010a51ab6f -[UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] + 169
8 Example 0x00000001090bcc48 _TFC7Example19ThirdViewController14collectionViewfS0_FTCSo16UICollectionView22cellForItemAtIndexPathCSo11NSIndexPath_CSo20UICollectionViewCell + 120
9 Example 0x00000001090bcf2f _TToFC7Example19ThirdViewController14collectionViewfS0_FTCSo16UICollectionView22cellForItemAtIndexPathCSo11NSIndexPath_CSo20UICollectionViewCell + 79
10 UIKit 0x000000010a50acf1 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:] + 481
11 UIKit 0x000000010a50d10c -[UICollectionView _updateVisibleCellsNow:] + 4242
12 UIKit 0x000000010a511871 -[UICollectionView layoutSubviews] + 247
13 UIKit 0x0000000109db211c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
14 QuartzCore 0x000000010ecb936a -[CALayer layoutSublayers] + 146
15 QuartzCore 0x000000010ecadbd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
16 UIKit 0x0000000109da1d7b -[UIView(Hierarchy) layoutBelowIfNeeded] + 1083
17 UIKit 0x000000010a526b90 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:] + 241
18 UIKit 0x000000010a52d42b -[UICollectionView _updateReorderingTargetPosition:forced:] + 1181
19 UIKit 0x000000010a52e51f -[UICollectionView _autoscrollForReordering:] + 2760
20 Foundation 0x00000001098cb671 __NSFireTimer + 83
21 CoreFoundation 0x0000000109222364 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
+ 20
22 CoreFoundation 0x0000000109221f11 __CFRunLoopDoTimer + 1089
23 CoreFoundation 0x00000001091e38b1 __CFRunLoopRun + 1937
24 CoreFoundation 0x00000001091e2e98 CFRunLoopRunSpecific + 488
25 GraphicsServices 0x000000010e76ead2 GSEventRunModal + 161
26 UIKit 0x0000000109d01676 UIApplicationMain + 171
27 Example 0x00000001090beead main + 109
28 libdyld.dylib 0x000000010bc9092d start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Resized cells and impossible reordering in waterfall layout example

Hi! In playing around with the third example, I find that there are times when I am not able to move a cell between two others, and times where the cells still get resized (I know there's a section at the end of the accompanying article detailing how some of the code for invalidationContextForInteractivelyMovingItems should prevent this from happening). Are these known issues? Are there any workarounds? Thanks for a great tutorial -- it remains some of the only useful documentation on this great new feature!

SecondViewController.swift

I have one Issue if I want to implement the extension SecondViewController with the
func collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to DestinationIndexPath: IndexPath){ //some code }
then Xcode want to change the func in an override func but this isnt that what i want cause i want to disable the recording. Could somebody help me?

Regards Alerp

Is IOS 9.0 a requirement?

I'm sorry this is probably not the right place to post this question.
I just noticed that if i try to change the deployment target to 8.4 i get 13 error's.
So just to clarify, this project is only ment for IOS >=9.0 right?
Thanks

CollectionViewWithCustomLayout is broken

Take any smaller cell and drag it to where a bigger cell is. It will look fine until you complete the drag, then the size suddenly jumps randomly and cell sizing is all messed up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.