Skip to content

Commit

Permalink
Layout fix
Browse files Browse the repository at this point in the history
  • Loading branch information
“gokulnair2001” committed Feb 3, 2021
1 parent f217256 commit 4976b1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CircleBar/Classes/SHCircleBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ class SHCircleBarController: UITabBarController {
self.tabBar.frame = tabFrame
tabBar.setNeedsLayout()
}

open override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
self.selectedIndex = 1
}
open override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
updateTabBarFrame()
Expand Down

1 comment on commit 4976b1b

@gokulnair2001
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout Fix: Major UI Issue

  • Basically there was a bug in layout, in the first preview of the tab bar the first tab bar item used to be at few distance away from the tab bar, So right now its been fixed. The previous view seems to be really uneven and I guess after this layout update everything seems even and looks good too.

SnapShot of Changes 📸

Old Look

New Look

As mentioned above the error is in the initial preview only, when the view loads up and I guess placing the tab bar item little below would be better than placing it high above. So I guess the updates which I made are worth implementing.

New Look

  • As you can notice after the first preview when we get into any tab bar item it stays normal . So the errors in first preview only.

Please sign in to comment.