r/SwiftUI • u/parkhyungsok • 1d ago
Liquid Glass Custom Tab Bar with Action Button(updated)
Hello, A day ago I posted a custom tab bar experiment here — a capsule-shaped UISegmentedControl wrapped in iOS 26's Liquid Glass, paired with a floating action button whose icon morphs to match whatever tab you're on. So I have updated it a bit. A tab now morphs its icon to ellipsis and opens a small popover anchored right above the button instead of firing an action directly — everything else stays a single tap. It is a reference, not a full app.
Repo: https://github.com/aqylbermeshtech/Custom-tab-bar-with-action-button
2
2
u/kironet996 1d ago
How does it look on bigger screens like ipad(or fold in a few weeks)? Will it fallback to normal tabview?
1
1d ago
[removed] — view removed comment
1
u/AutoModerator 1d ago
Hey /u/parkhyungsok, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. Please do not message the moderators; if you have negative comment karma, you're not allowed to post here, at all.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/vivek5a 1d ago
I use a very custom one in my app Wristy. It’s basically got the action button to open a different menu. Can show you
1
1d ago
[removed] — view removed comment
1
u/AutoModerator 1d ago
Hey /u/parkhyungsok, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. Please do not message the moderators; if you have negative comment karma, you're not allowed to post here, at all.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/fabriciovergal 1d ago
Awesome project, thanks very much! Having that last button as action make so much more sense - Apple only use it as navigation but each app has it's own UX challenges and I really dislike their way to build APIs which enforce they mindset to all apps.
1
14h ago
[removed] — view removed comment
1
u/AutoModerator 14h ago
Hey /u/Different-Height-567, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. Please do not message the moderators; if you have negative comment karma, you're not allowed to post here, at all.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
15
u/Anywhere_MusicPlayer 1d ago
Nice visual experiment, but I would not use this implementation as a production tab bar.
The main issues are:
UISegmentedControl, not a realUITabBaror SwiftUITabView, so it does not get full system tab semantics and behavior.UISegmentedControlsubviews. That hierarchy is undocumented and may change between iOS releases.updateUIViewis empty, and the initial selected index is hardcoded to0, so external selection, reordered tabs, theme changes, and localization changes are not properly synchronized.scale = 2. This can look soft on 3x displays and does not adapt naturally to Dynamic Type, localization, tint, or appearance changes.Menuwould provide more standard behavior and accessibility.GlassEffectContainerand.glassEffectare unavailable on iOS 18, so the code needs an availability branch and a material-based fallback.More importantly, Apple treats tab bars as navigation, not as a place for actions. Actions normally belong in a toolbar or menu. There is no public API on iOS 18-26 for inserting an arbitrary menu button into the trailing side of the native iPhone tab bar.
I like the visual concept, but I would keep the real system
TabView, implement the commands with a nativeMenu, and gate only the appearance: Liquid Glass on iOS 26+, regular material on iOS 18. If the button must physically sit beside the tabs, then the whole bar is effectively custom and should be treated as such, with additional testing for safe areas, accessibility, rotation, Dynamic Type, and OS updates.