Closed athemer closed 6 years ago
I'm having the same issue. When selecting a cell, I perform a push segue. After unwinding back to the collection view screen, the cells overlap and sometimes the last cell is scaled to around 1.5 it's normal size.
Yeh I'm having same issue - glad someone else has. I've added two screenshots. When I first load it works fine, but when i tap a cell and open another view controller and then close that view controller it goes horribly wrong!
Thanks for the screenshots @jshrager, I'll look in to this.
Not sure if you've found / replicated issue yet - but i have app on my iPhone 7 Plus running iOS 11 and not seen the issue yet - but when i put it on my wife's iPhone 6s 10.3 originally this is how i saw the issue.
Thanks for update @jshrager, I have reproduced in the sample app in this repo, and aim to get a fix in as soon as I can.
I'm running into a similar issue, but not completely the same. For me I put the carousel inside a ScrollView, every time when I do "pull to refresh" all the cards become to be same size and make the screen very crowded, similar to what @jshrager shows here.
Any known solution for this?
I have not had time to look in to this yet. If you get a chance to investigate, maybe you could propose a solution and open a PR.
I think you guys are having this issue because of not connecting ScrollView Delegate. Thanks.
Thanks @kingsofteng. The readme states that you need to set the collection delegate. Does this solve you issue @athemer @StPayne55 @cnbuff410 @jshrager ? If so, I will close this.
I have both data source
and delegate
set to my main view controller if it is what you mean.
I just manually call "didScroll()" every time the screen show up on the phone, and that solve the issue for me temporarily.
Ok, thanks for the feedback @cnbuff410 . I will try to find a long-term solution when I get the time.
How did you manage to add shadow to the cell? @jshrager
Interesting for me too, because the shadow is clipped if I try to add it. Did you add it like another view on the sides of MainView?
I faced the same issue but It gets solved with
func scrollViewDidScroll(_ scrollView: UIScrollView) {
carousel.didScroll()
}
As the usage says:
Set your UIViewController as the collection view delegate and implement the UIScrollViewDelegate method scrollViewDidScroll(:). In this method, call the didScroll() method of ScalingCarouselView.
Thanks @pabsanmez for pointing out the correct solution 👍🏼
hi, when I select the cells, it scrolls a little bit to the left. also, for example, if I have a tab bar vc as parent and two child vc. I add the collectionView to child A, the same situation happens when I switch back from vc B. Is this fixable ? thanks !