WaveTab icon indicating copy to clipboard operation
WaveTab copied to clipboard

Tab bar circle not updating properly after showing or hiding side menu drawer.

Open Satish24sp opened this issue 3 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Add side menu drawer along with wave tab bar
  2. Click or slide to show or hide side menu.
  3. Tab bar not updating properly, when side menu hides.

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

Screenshot 2022-01-27 at 1 01 47 AM

Smartphone:

  • Device: Simulator iPhone 12 Pro Max
  • OS: iOS 15.0

Satish24sp avatar Jan 26 '22 19:01 Satish24sp

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.

Dhvani19 avatar Mar 23 '22 11:03 Dhvani19

Fixed in This PR #8

MrPrakashR avatar Jun 20 '23 11:06 MrPrakashR

@MrPrakashR thanks will check.

Satish24sp avatar Jun 22 '23 15:06 Satish24sp