Giter Club home page Giter Club logo

scsectionbackground's People

Contributors

strawberrycode 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

Watchers

 avatar  avatar  avatar

scsectionbackground's Issues

Reloading cells at index path will cause crash

HI,

I got block by this issue. if you simply add a reload line to in didSelectItemAt and then run the project. by scrolling to the bottom and getting back to the top. if you tap on mid-cells app will crash.

here is the error:
*** Assertion failure in -[UICollectionViewData layoutAttributesForDecorationViewOfKind:atIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UICollectionViewData.m:982 2017-02-09 16:18:44.200 SCSectionBackground[25643:420562] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'no UICollectionViewLayoutAttributes instance for -layoutAttributesForDecorationViewOfKindOfKind: sectionBackground at path <NSIndexPath: 0xc000000000c00316> {length = 2, path = 3 - 6}' *** First throw call stack: ( 0 CoreFoundation 0x0000000112e28d4b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010fb1421e objc_exception_throw + 48 2 CoreFoundation 0x0000000112e2ce42 +[NSException raise:format:arguments:] + 98 3 Foundation 0x000000010f6a966d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195 4 UIKit 0x000000011109dbeb -[UICollectionViewData layoutAttributesForDecorationViewOfKind:atIndexPath:] + 1045 5 UIKit 0x000000011109adea -[UICollectionViewData rectForDecorationElementOfKind:atIndexPath:] + 344 6 UIKit 0x0000000111052735 -[UICollectionView _viewAnimationsForCurrentUpdate] + 11507 7 UIKit 0x0000000111056899 __71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke.1993 + 197 8 UIKit 0x00000001107b0239 +[UIView(Animation) performWithoutAnimation:] + 90 9 UIKit 0x00000001110553ef -[UICollectionView _updateWithItems:tentativelyForReordering:animator:] + 3942 10 UIKit 0x000000011104f421 -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] + 17765 11 UIKit 0x000000011104ace1 -[UICollectionView _updateRowsAtIndexPaths:updateAction:] + 377 12 SCSectionBackground 0x000000010f51cab0 _TFFC19SCSectionBackground41SectionBackgroundCollectionViewControllerP33_342C3AFA0BE40941A52813FC0FF474EC10reloadCellFT9indexPathV10Foundation9IndexPath_T_U_FT_T_ + 240 13 SCSectionBackground 0x000000010f51cb27 _TTRXFo___XFdCb___ + 39 14 UIKit 0x00000001107b0239 +[UIView(Animation) performWithoutAnimation:] + 90 15 SCSectionBackground 0x000000010f51c993 _TFC19SCSectionBackground41SectionBackgroundCollectionViewControllerP33_342C3AFA0BE40941A52813FC0FF474EC10reloadCellfT9indexPathV10Foundation9IndexPath_T_ + 259 16 SCSectionBackground 0x000000010f51c7f9 _TFC19SCSectionBackground41SectionBackgroundCollectionViewController14collectionViewfTCSo16UICollectionView15didSelectItemAtV10Foundation9IndexPath_T_ + 57 17 SCSectionBackground 0x000000010f51c877 _TToFC19SCSectionBackground41SectionBackgroundCollectionViewController14collectionViewfTCSo16UICollectionView15didSelectItemAtV10Foundation9IndexPath_T_ + 87 18 UIKit 0x000000011102f6e4 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:] + 702 19 UIKit 0x000000011105a4d2 -[UICollectionView touchesEnded:withEvent:] + 649 20 UIKit 0x000000011090df6b forwardTouchMethod + 348 21 UIKit 0x000000011090e034 -[UIResponder touchesEnded:withEvent:] + 49 22 UIKit 0x000000011090df6b forwardTouchMethod + 348 23 UIKit 0x000000011090e034 -[UIResponder touchesEnded:withEvent:] + 49 24 UIKit 0x0000000110766545 -[UIWindow _sendTouchesForEvent:] + 2747 25 UIKit 0x0000000110767c33 -[UIWindow sendEvent:] + 4011 26 UIKit 0x00000001107149ab -[UIApplication sendEvent:] + 371 27 UIKit 0x0000000110f0172d __dispatchPreprocessedEventFromEventQueue + 3248 28 UIKit 0x0000000110efa463 __handleEventQueue + 4879 29 CoreFoundation 0x0000000112dcd761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 30 CoreFoundation 0x0000000112db298c __CFRunLoopDoSources0 + 556 31 CoreFoundation 0x0000000112db1e76 __CFRunLoopRun + 918 32 CoreFoundation 0x0000000112db1884 CFRunLoopRunSpecific + 420 33 GraphicsServices 0x0000000115c96a6f GSEventRunModal + 161 34 UIKit 0x00000001106f6c68 UIApplicationMain + 159 35 SCSectionBackground 0x000000010f51dd2f main + 111 36 libdyld.dylib 0x0000000113dd868d start + 1 37 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

App crash

When i make this example to support all orientation, while moving from portratoit to landscappre or vice versa the app crashes with below error,
SCSectionBackground[34266:300939] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'layout attributes for supplementary item at index path (<NSIndexPath: 0x6000028aa600> {length = 2, path = 0 - 0}) changed from <SCSectionBackground.SCSBCollectionViewLayoutAttributes: 0x7ff023717780> index path: (<NSIndexPath: 0x6000028a9220> {length = 2, path = 0 - 0}); element kind: (sectionBackground); frame = (0 0; 667 116); zIndex = -1; to <SCSectionBackground.SCSBCollectionViewLayoutAttributes: 0x7ff023700110> index path: (<NSIndexPath: 0x6000028aa600> {length = 2, path = 0 - 0}); element kind: (sectionBackground); frame = (0 0; 375 116); zIndex = -1; without invalidating the layout'

Could you help to resolve this ?

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.