rhodgkins / rdhcollectionviewgridlayout Goto Github PK
View Code? Open in Web Editor NEWGrid layout for UICollectionView
License: Other
Grid layout for UICollectionView
License: Other
Hi, nice work.
Is there a way to have rectangular cells instead of squared ones?
Thanks
Change RDHGridLayoutTests.m
to Swift
Is there a way to set section insets? I notice the the class is not a subclass of UICollectionViewFlowLayout so I'm not sure how this would be achieved.
I can't seem to get headers or footers to work while using this layout, any possibility you could add a stretchy re-sizable header / footer between sections?
Thanks!
I know this is an issue with UICollectionView and not your Layout, but is there a way to use horizontal scroll with your layout and get the data to show up like this:
[0] [1] [2] | [6] [7] [8]
[3] [4] [5] | [9]
instead of:
[0] [2] [4] | [6] [8]
[1] [3] [5] | [7] [9]
I'm getting an EXC_ARITHMETIC
error (division by 0) when reloading a CollectionView using RDHCollectionViewGridLayout
frame = [self.firstLineFrames[indexPath.item % self.lineItemCount] CGRectValue];
(lldb) po self
<RDHCollectionViewGridLayout: 0x7a74cbe0; scrollDirection = Vertical; lineDimension = (Size, 0.000); lineItemCount = 0; itemSpacing = 10.000; lineSpacing = 10.000; sectionsStartOnNewLine = YES>
(lldb) po indexPath
<NSIndexPath: 0x7a637a30> {length = 2, path = 0 - 0}
* thread #1: tid = 0x538888, 0x00122388 imgur`-[RDHCollectionViewGridLayout calculateLayoutAttributesForItemAtIndexPath:](self=0x7a74cbe0, _cmd=0x001514a5, indexPath=0x7a637a30) + 312 at RDHCollectionViewGridLayout.m:341, queue = 'com.apple.main-thread', stop reason = EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0)
frame #0: 0x00122388 imgur`-[RDHCollectionViewGridLayout calculateLayoutAttributesForItemAtIndexPath:](self=0x7a74cbe0, _cmd=0x001514a5, indexPath=0x7a637a30) + 312 at RDHCollectionViewGridLayout.m:341
* frame #1: 0x001209a8 imgur`-[RDHCollectionViewGridLayout prepareLayout](self=0x7a74cbe0, _cmd=0x013ed93f) + 536 at RDHCollectionViewGridLayout.m:103
frame #2: 0x011d70d2 UIKit`-[UICollectionViewData _prepareToLoadData] + 76
frame #3: 0x011d78e0 UIKit`-[UICollectionViewData validateLayoutInRect:] + 68
frame #4: 0x011973a3 UIKit`-[UICollectionView layoutSubviews] + 171
frame #5: 0x00b007b1 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
frame #6: 0x020c4771 libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #7: 0x050b31cf QuartzCore`-[CALayer layoutSublayers] + 152
frame #8: 0x050a7055 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 397
frame #9: 0x050a6eb0 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 26
frame #10: 0x050051b6 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 284
frame #11: 0x0500658a QuartzCore`CA::Transaction::commit() + 392
frame #12: 0x05006c56 QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
frame #13: 0x0234818e CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #14: 0x023480d0 CoreFoundation`__CFRunLoopDoObservers + 400
frame #15: 0x0233db0a CoreFoundation`__CFRunLoopRun + 1226
frame #16: 0x0233d37b CoreFoundation`CFRunLoopRunSpecific + 443
frame #17: 0x0233d1ab CoreFoundation`CFRunLoopRunInMode + 123
frame #18: 0x04f6a2c1 GraphicsServices`GSEventRunModal + 192
frame #19: 0x04f6a0fe GraphicsServices`GSEventRun + 104
frame #20: 0x00a749b6 UIKit`UIApplicationMain + 1526
frame #21: 0x000dc13d imgur`main(argc=1, argv=0xbff265d8) + 141 at main.m:14
frame #22: 0x029fcac9 libdyld.dylib`start + 1
Xcode 7 introduced UI testing - use this to test scrolling and invalidation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.