Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NBUAssetsGroupViewController.gridView infinite loop in layoutSubviews #7

Open
callbacknull opened this issue Sep 30, 2014 · 6 comments
Labels

Comments

@callbacknull
Copy link

So, I had a NBUAssetsGroupViewController set up properly and definitely works in iOS 7. However, with the iOS 8 release it seems that the ObjectGridView is getting stuck in an infinite loop on the layoutSubviews method.

@rivera-ernesto
Copy link
Contributor

Does it happen in the Demo project?

@callbacknull
Copy link
Author

Well, so that part of the demo has been broken - at least as long as I started using NBUImagePicker. Though not much was needed to get it to work - had to enable the tabbar item, create the missing xib file.

So I guess something with how I use it then. How I set things up was a created a 'Camera' storyboard (I use Storyboard links - RBStoryboardLink) with all my different parts connected by segue. So in there I have inherited versions of the NBUCameraVC, NBUAssetsLibraryVC, NBUAssetsGroupVC, and NBUCropVC.

I added the following in viewDidLoad to trigger the segue between the LibraryVC and the GroupVC.

self.groupSelectedBlock = ^(NBUAssetsGroup *group) {
        @strongify(self);
        [self performSegueWithIdentifier:@"GroupSegue" sender:group];
    };

And in the prepareForSegue: I set my GroupVC's assetsGroup property. Right at the beginning of the transition something throws it off into the infinite loop.

I tried debugging it a bit but I hadn't poked around the library too much before. I think my head hurts now from the like what - 5 levels of inheritance in some places? :P

Anyways, it's not too big of a deal for me anymore. I needed to find a solution asap so I ended up replacing that part of the app with the FPPicker library.

@rivera-ernesto
Copy link
Contributor

It would be good to set a break point wherever it loops, let it loop a couple of times and take a screenshot of the stack at the breakpoint. Then we can see what are the sequence of calls that take part of the infinite loop.

@rivera-ernesto
Copy link
Contributor

Well, so that part of the demo has been broken

Is the loop or the demo broken?

@callbacknull
Copy link
Author

Ahh yeah that'd be something to try.

Although, on another note, you're planning removing iOS 5 support from NBUKit, right? Soooo then ObjectGridView can probably gonna get updated to a collection view then, eh? :D

It's the demo that's broken - loop unrelated. I had it working and no loop bug.

@rivera-ernesto
Copy link
Contributor

Yes, getting rid of all non NBU-prefixed classes soon.

I will check the Demo. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants