Cell not behind center item
StackHelp opened this issue · comments
StackHelp commented
David Gutierrez commented
Hi @StackHelp, Did you found a solution?
David Gutierrez commented
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