Ramotion / circular-carousel

List a collection of items in a horizontally scrolling view. A scaling factor controls the size of the items relative to the center.

Home Page:https://www.ramotion.com/swift-app-development-ui-library-for-organizing-a-collection-of-items/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cell not behind center item

StackHelp opened this issue · comments

I want center cell always on a front side and then second row and then last one to display like the globe tab icon here in gif. Is it possible?

tag

Hi @StackHelp, Did you found a solution?

Hey i found a solution, probably can be optimized, but just was a fast approach

guard let item = carousel.itemView(atIndex: index) else { return } for view in carousel.contentView.subviews { if let btn = view.subviews.first as? UIButton { if btn.tag == item.tag { carousel.contentView.bringSubviewToFront(view) } } }

this can be called anywhere when you have access to that index, i used it on the did select item