Skip to content

修复隐藏加号按钮关闭后的底栏布局无法恢复五等分的问题#313

Merged
Wtrwx merged 1 commit into
Wtrwx:mainfrom
VexCove:fix-plus-button-tab-layout
Jun 5, 2026
Merged

修复隐藏加号按钮关闭后的底栏布局无法恢复五等分的问题#313
Wtrwx merged 1 commit into
Wtrwx:mainfrom
VexCove:fix-plus-button-tab-layout

Conversation

@VexCove

@VexCove VexCove commented Jun 1, 2026

Copy link
Copy Markdown

修复开启“隐藏底栏加号”后,再关闭该设置时,底栏布局没有正确恢复的问题。

此前隐藏加号时,逻辑会直接让加号按钮的工厂方法返回 nil,导致加号按钮不再创建。随后底栏在 layoutSubviews 中会按照当前存在的 4 个按钮重新均分宽度,因此“首页、朋友、消息、我”会保持四等分布局。关闭隐藏设置后,加号虽然恢复显示逻辑,但原本缺失的视图和已经被改写的 frame 无法稳定恢复,最终造成加号位置异常。

本次修复改为保留加号按钮的创建流程,只在 AWENormalModeTabBar 布局阶段根据 DYYYHidePlusButton 控制加号的隐藏与显示。同时将加号按钮纳入底栏按钮识别和背景跳过逻辑,确保开启隐藏时为 4 等分,关闭隐藏后可恢复为 5 等分布局。

纯AI修复

@VexCove VexCove changed the title Fix tab bar layout after toggling plus button 修复隐藏加号按钮关闭后的底栏布局无法恢复五等分的问题 Jun 1, 2026
@Wtrwx Wtrwx merged commit db27085 into Wtrwx:main Jun 5, 2026
@VexCove VexCove deleted the fix-plus-button-tab-layout branch June 6, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants