Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Crash when used in UIPageViewController? #4

Closed
LeeHeap opened this issue Jul 1, 2014 · 2 comments
Closed

Crash when used in UIPageViewController? #4

LeeHeap opened this issue Jul 1, 2014 · 2 comments

Comments

@LeeHeap
Copy link

LeeHeap commented Jul 1, 2014

Hi
First of all great project, very elegant compared to most of the other solutions!
I've been playing with using it with UICollectionViewControllers within a UIPageViewController - when the 'page' is changed to a new UICollectionViewController, I set self.shyNavBarManager.scrollView to collectionViewController.collectionView.
It works fairly well, but randomly crashes with EXC_BAD_ACCESS on the TLYDelegateProxy property originalDelegate during what appears to be a call to respondsToSelector. originalDelegate isn't nil, and as the collectionView has no delegate set by me the originalDelegate is a TLYDelegateProxy too.

Secondly, but far less important - when 'paging' to a new UICollectionViewController and setting shyNavBarManager.scrollView, the contentOffset isn't applied to the new scrollView. I'm guessing this could be solved fairly easily - may make a pull request if you don't mind :)

Thanks for sharing your work!

@Mazyod
Copy link
Contributor

Mazyod commented Jul 1, 2014

Hi @LeeHeap,

I'm glad you found it useful! Thanks for the detailed bug report, it'll be an easy fix. In our project, I haven't tested much changing the scrollView property after setting it, so that was kind of a blind spot.

I'll fix the first issue now, and if you're fixing the second issue, please! I'll wait for the PR.

@Mazyod Mazyod added the bug label Jul 1, 2014
@Mazyod Mazyod self-assigned this Jul 1, 2014
Mazyod added a commit that referenced this issue Jul 1, 2014
[FIX]: make sure we unset our proxy delegate, and add a sanity check that the delegate proxy doesn't reference itself.
@Mazyod
Copy link
Contributor

Mazyod commented Jul 1, 2014

Hey @LeeHeap,

I tried to quickly reproduce your issue, to make sure it is resolved, but couldn't find an easy way. It'd be greatly appreciated if you can test out this fix.

Thanks!

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

No branches or pull requests

2 participants