RBCollectionViewInfoFolderLayout icon indicating copy to clipboard operation
RBCollectionViewInfoFolderLayout copied to clipboard

Demo application not running

Open MaikoHermans opened this issue 9 years ago • 8 comments

I'm trying to run the demo application, when I do this I get the following error

RBCollectionViewInfoFolderLayout[19992:1154545] [/BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI_Sim/CoreUI-371.4/Bom/Storage/BOMStorage.c:507] stream invalid; root page is outside of address range 2016-02-12 19:16:47.198 RBCollectionViewInfoFolderLayout[19992:1154484] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCache setObject:forKey:cost:]: attempt to insert nil value (key: http://i.annihil.us/u/prod/marvel/i/mg/2/d0/4bc6815155c10/portrait_incredible.jpg)' *** First throw call stack: ( 0 CoreFoundation 0x0000000109a20e65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000109499deb objc_exception_throw + 48 2 CoreFoundation 0x000000010993c581 -[NSCache setObject:forKey:cost:] + 401 3 RBCollectionViewInfoFolderLayout 0x000000010781276a __56-[ViewController collectionView:cellForItemAtIndexPath:]_block_invoke_2 + 106 4 libdispatch.dylib 0x000000010a47249b _dispatch_client_callout + 8 5 libdispatch.dylib 0x000000010a45bc3c _dispatch_barrier_sync_f_slow_invoke + 284 6 libdispatch.dylib 0x000000010a47249b _dispatch_client_callout + 8 7 libdispatch.dylib 0x000000010a45a2af _dispatch_main_queue_callback_4CF + 1738 8 CoreFoundation 0x0000000109980d09 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 9 CoreFoundation 0x00000001099422c9 __CFRunLoopRun + 2073 10 CoreFoundation 0x0000000109941828 CFRunLoopRunSpecific + 488 11 GraphicsServices 0x000000010c79ead2 GSEventRunModal + 161 12 UIKit 0x0000000107b06610 UIApplicationMain + 171 13 RBCollectionViewInfoFolderLayout 0x000000010781c00f main + 111 14 libdyld.dylib 0x000000010a4a692d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

I'm also wondering how can I implement this when I already have made a custom cell myself with a .xib file? I'm not that experienced with swift/objective c(I'm using swift) so I'm having trouble implementing it.

MaikoHermans avatar Feb 12 '16 18:02 MaikoHermans

Looks like you might be having a network issue with attempting to fetch the images in the demo. I didn't write the demo to be very robust, it was just a quick an dirty way to show how the layout looks/works.

As for swift integration, I've not attempted to do that yet. I'm just now getting to learning swift myself. As for using your own xib designed cell you should only need to register your xib/class for the appropriate views.

eoghain avatar Feb 12 '16 18:02 eoghain

@eoghain I got it working in swift I'm just having one problem. They way my collection views where set up before I was using a custom collectionviewflowlayout for it. With your code implemented I can't seem to use this anymore. I created a question about it on stack overflow too here.

could you take a look at it maybe you know how I can make sure it all works. I would appreciate it

MaikoHermans avatar Feb 19 '16 16:02 MaikoHermans

@MaikoHermans I doubt you're going to get much help on Stack Overflow as I don't thing anyone but me is actually using this control for anything. But I'll take a look at your question and help out where I can. FYI, this control is a layout engine for the UICollectionView so it takes the place of the flow layout that you were using.

eoghain avatar Feb 20 '16 04:02 eoghain

@eoghain Yeahh i figured it would be hard to get help but maybe some people who would take the effort to check it out could help me. I really appreciate your help! I just pushed my code to my git like you pointed out I forgot to do so. I hope it will make it a little clearer to you what I'm trying to do and what is going wrong

MaikoHermans avatar Feb 20 '16 11:02 MaikoHermans

@eoghain I edited my question on stack overflow again. And I updated my git again. I was able to create the layout like I wanted to. However I'm having a problem with the folder that should fold out when it's being tapped. It shows for a second then it folds back in. It looks like this is being cause because the folder goes outside of the screen. Also the dimple isn't being drawn like it's supposed to. Please take a look at my project so you can see what I'm talking about/doing wrong

my git

MaikoHermans avatar Feb 25 '16 09:02 MaikoHermans

@MaikoHermans I'll take a look this weekend, unfortunately my week has gotten real busy and I haven't had a chance to revisit your question. I see you submitted a pull request about the dimple and I'll review that this weekend also.

eoghain avatar Feb 25 '16 19:02 eoghain

@eoghain I'm guessing you haven't been able to take a look at it. I did some more testing and it seems to have to do with the way I'm trying to set the layout for the collection view. I would think that it would be nicer the way I tried to do it maybe when you do have time to look at it you know what I mean. When I first pull the RBCollectionViewInfoFolderLayout out of the collection view i set it to and then edit the values it works. When I don't do this like you would see in the project I pushed to github it has problems with drawing the info folder. I hope this info will help you to figure out what I mean

MaikoHermans avatar Feb 29 '16 10:02 MaikoHermans

@MaikoHermans yeah, the weekend got away from me so I didn't have time to look into this. I'l take a look when I get a chance. Not sure if there is anything I can do about how the layout is set, since that is all controlled by Apple. But I might not be understanding your issue.

eoghain avatar Feb 29 '16 17:02 eoghain