Open Satish24sp opened 2 years ago
While circle and imageView is added to view just remove both from superview. it works for me!
func setupCircle(_ width: Float) { circle?.removeFromSuperview() // ->> Add this line circle = UIView(frame: CGRect(x: 0.0, y: 0.0, width: CGFloat(width), height: CGFloat(width))) circle?.layer.cornerRadius = CGFloat(width) / 2 circle?.center = CGPoint(x: tabBarItems[safeSelectedIndex].center.x, y: 0.0) tabBar.addSubview(circle!) }
func setupImageView(_ center: Float) { let image = viewControllers?[safeSelectedIndex].tabBarItem.selectedImage imageView?.removeFromSuperview() // ->> Add this line imageView = UIImageView(image: image) imageView?.contentMode = UIView.ContentMode.scaleToFill circle?.addSubview(imageView!) imageView?.center = CGPoint(x: CGFloat(center), y: CGFloat(center)) }
Thanks.
Fixed in This PR #8
@MrPrakashR thanks will check.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior Wave tab bar is working perfectly when I use only bottom tab bar but when I implemented the side menu or when I come back from another view controller, it's wave behaviour is not updating. It should work same on every condition not only for bottom tab bar.
Screenshots/Video Here is the video link for the same.
Video Link
https://user-images.githubusercontent.com/35003745/151233944-896ad4de-81db-4f05-a8de-bc5d9b161474.mov
Screenshot Link
Smartphone: