Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageTabBar will grow/shrink continuously #742

Closed
OrkhanAlikhanov opened this issue Apr 18, 2017 · 3 comments
Closed

PageTabBar will grow/shrink continuously #742

OrkhanAlikhanov opened this issue Apr 18, 2017 · 3 comments
Assignees

Comments

@OrkhanAlikhanov
Copy link
Contributor

If someone sets the pageTabBar.layoutEdgeInsets.[bottom or top] to a non-zero value the pageTabBar's height will change on every layoutSubviews()

The layoutSubviews method has following:

let p = pageTabBar.intrinsicContentSize.height + pageTabBar.layoutEdgeInsets.top + pageTabBar.layoutEdgeInsets.bottom
pageTabBar.height = p

where pageTabBar.intrinsicContentSize.height just returns the pageTabBar.height.

On every call to that method, pageTabBar.intrinsicContentSize.height will yield the current height which was added up with values of pageTabBar.layoutEdgeInsets before.

@daniel-jonathan daniel-jonathan self-assigned this Apr 20, 2017
@daniel-jonathan
Copy link
Member

The PageTabBarController is being replaced by a new component PageMenuController that is near completion. So this will be replaced. I am going to leave this up until I release the component, and make sure to make the intention of the code more clear in this area. Thank you!

@daniel-jonathan
Copy link
Member

This has now been fixed and will be added to the next release. Thank you!

@daniel-jonathan
Copy link
Member

This component has now been updated in Material 2.8.0. Features like swiping have not been included in 2.8.0, and will be included in a following release. The overall TabsController adds stability and scrollable Tabs. I am closing this issue and thank you for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants