r/SwiftUI • • Oct 19 '26

Native TabView with Action Button update!!!

Hello there, I wanted to share a small SwiftUI/UIKit experiment I’ve been working on. I have built a custom Liquid Glass tab bar in SwiftUI that dynamically expands into a 4th tab when you switch views!
The project is open source and has no external dependencies.

GitHub Repo: https://github.com/aqylbermeshtech/Custom-tab-bar-with-action-button

PS:I wrote there before actually about the native tab bar with action button and you pointed out that using UISegmentedControl is not a good idea so i remade it into a TabView one.Pls reach out if you see any problems.

49 Upvotes

16 comments sorted by

60

u/Poufii Oct 19 '26

nice experimentation, but it feels like an UI/UX nightmare

4

u/seperivic Oct 19 '26

Yeah, it’s cool, but it does beg questions like how does this translate to other platforms or the Duo’s right-side toolbar?

2

u/vikingosegundo Oct 20 '26

and how much of the animations will not be seen, as they are covered by the thumb?

14

u/unpluggedcord Oct 19 '26

Custom tab bar = non starter :/

8

u/Funny-Somewhere-9293 Oct 19 '26

Why? That totally goes against the human interface guidelines. Tabs are supposed to be consistent. Why can’t I get to profile from home? So arbitrary. If an action item is only accessible on a certain tab then it should not be in the tabview.

14

u/icominblob Oct 19 '26

This is a terrible UX choice!

-6

u/beclops Oct 19 '26

How? UX is practically unchanged aside from the animation. Accessibility issues maybe

4

u/DensityInfinite Oct 20 '26

UX is very much changed - to have more confusion in the mix.

A tab bar displays the top-most hierarchical layer of an app. That is, every tab exists on the same layer on the tab bar.

OP seems to want a primary "+" action on the Home tab that is easily reachable by the thumb. However, if this is their intent, then the "+" is contextual to the Home tab. Anything contextual to a specific tab shouldn't exist in the tab bar, since, again, the tab bar's design implies that everything on it belongs to the same hierarchical layer. Instead, the "+" should be in the top toolbar, since that is contextual to the tab.

Think of an app like a facility with three entry doors labelled "Home", "Notifications", and "Settings" respectively. If the "+" is specific to the "Home" part of the facility, then users should access it by going into the "Home" door. Instead, OP chose to place the button next to the three doors. This is fine if the "+" is a universal action that doesn't depend on the tabs (hence a user can use it without going in any doors), but that's not the case here. Hence the "+" being on the tab bar is incorrect.

Similarly, it's weird that a user has to go in a non-"Home" door first to have the "Profile" door show up. One might read this and think, "That doesn't make any sense! How can someone go inside a door to enable access to another area of the facility, when the first door already leads inside?" That's exactly right. OP's tab bar therefore doesn't make any sense.

0

u/beclops Oct 20 '26

I disagree with this. A very common alternative, and while not recommended by Apple it is extremely common, would be to have this action placed directly above the tab bar. There is no fundamental difference between these two approaches aside from animation and very minor vertical positioning at this point, especially if the action only appears on the Home page. Another thing is your point about the tab bar displaying the “top-most hierarchical layer of an app”. Now this is true (one thing I’d question is how relevant that even is to the user), but I’d argue the navigation bar holds this responsibility as well in non-tab bar apps and actions like this are placed in these all of the time. Bottom line, I don’t see a fundamental difference in this solution than the traditionally used solutions

1

u/DensityInfinite Oct 21 '26 edited Oct 21 '26

I’m boutta get all nerdy here, so buckle up.

  1. There is a fundamental difference, simply, an action placed directly above the tab bar is NOT on the tab bar. This matters more than you’d think. When the “+” is not on the tab bar, it’s considered an action contextual to the tab, and so putting the “+” there in this case makes sense and is acceptable. Putting the “+” on the tab bar, again, makes it a global action that can be executed from any tab, which, if OP needed to make the “+” hide when switching away from the “Home” tab, is clearly not the case. Therefore placing the “+” on the tab bar is just incorrect, because “+” is evidently contextual. Making a contextual action lose its context is as good as taking your bed outdoors to sleep.

  2. UI/UX is all about making decisions that subconsciously help the user navigate the interface, and defining a clear hierarchy for an app is part of it. An app’s structure should be intuitive and easy to understand, so as to help with the app’s learnability and memorability. Having a dynamically changing and hierarchically ambiguous tab bar certainly does not help this aspect. So, despite us not explicitly telling the user “hey this is the top hierarchy” etc., they will subconsciously understand this structure as they apply the same logic (mental model) that they’ve built up over using other apps. This industry consistency (what we refer to as external consistency) helps them navigate the app too. Every UI decision is very, very relevant to the user, especially in an element as essential as the tab bar.

  3. I question what you meant by “navigation bar”. If you are referring to the HIG/SwiftUI definition, then it refers to the top toolbar with navigation controls. Yes, actions like the “+” button are frequently placed there, because that’s what a toolbar is meant to do. It’s meant to house these buttons, as the navigation bar is contextual to every page. Not even a tab! A page! The contents of the navigation bar can change with every navigation action, like opening a folder, etc. Which is to say, the navigation bar has never been the top hierarchal layer, because everything that it does is inherently contextual and local to the page. Most non-tab-bar apps do a single thing, so their hierarchy entry point is what they show the user on launch, or whatever is at the bottom of their navigation stack. For instance, the Messages app shows a list of conversations. These conversations are your doors, and you choose which conversation to go into and engage with. The same goes with Mail, which has a list of mailboxes at the bottom of the navigation stack as the hierarchy’s entry point. None of them ever referred to the navigation bar as the top layer of the hierarchy, as it has never carried that information.

Edit: fix weird formatting

0

u/beclops Oct 21 '26 edited Oct 21 '26

I think you’re mistaking what the HIG guidelines and what developer conventions are with what constitutes bad UX. To a user, there is literally no difference between the solutions. They have no awareness of the HIG, and have no awareness of the intended scope of each UI element. These arguments are not UX arguments, they’re developer-focused ergonomic arguments. For a user there is not a meaningful difference. Personally I don’t like getting into the notion that not following the HIG 100% is automatically “bad UX”. There are many applications built for Android for instance that expectedly don’t follow the HIG at all that offer great UX, same can be said about some products on iOS. At the end of the day they’re a solid set of guidelines, but a user at the end of the day only cares about how your app feels not whether it follows some arbitrary set of rules they didn’t know existed or how the underlying UI elements work

1

u/DensityInfinite Oct 22 '26 edited Oct 22 '26

“Deviating from the HIG = bad UX” was never part of my point. Deviating from tried-and-tested industry standards is fine on its own as well, but there’s a fine line between a good design that breaks free from the shackles of convention using knowledge and expertise, and a bad design that’s made without understanding the fundamental principles that these conventions are built upon in the first place. Compared to a “conventional” tab bar, OP’s design has a confusing hierarchy that worsens the app’s learnability and memorability, and has a convoluted way to access “Profile” that worsens efficiency, and both contributes to increased cognitive load for the user. This design therefore performs worse in regards to the fundamental usability goals of HCI, and in my opinion, this makes the design objectively bad. I only quote the HIG because it’s the culmination of research and industry experience, and it’s an easy point of reference for what’s generally good and generally bad during discussions like this one, and it targets the same fundamental design goals as above. Personal judgement obviously plays a large part in determining whether a design is good or bad, and I believe I’ve already made my judgement very clear.

Your argument seems to be centred around how the technicalities I’ve stated don’t affect the user in any “real” way. I’ve been trying to make a point that they do since the start of this discussion, because these technicalities are literally what interaction & UX design is all about, and every decision we make here affects the user. UX design literally wouldn’t exist if it were true that “the user doesn’t care”. They do care; they won’t tell you that, or they won’t be able to subjectively tell, because not having to think about it is precisely what we’re trying to achieve. We want the app to be intuitive and learnable without the user knowing the principles of HCI, HIG, or the design rationales behind these technicalities, and the very design decisions you are dismissing here are the techniques that make this happen. Just because the users ideally don’t have to think about it doesn’t mean that designers don’t need to think about it. Experts in the field do everything they can to improve an app’s usability and reduce its cognitive load, and a large part of it is through technicalities like these.

I agree that at the end of the day, how the app feels is what the user cares about. So in a sense, we’re arguing the same thing, it’s just that you’re questioning whether we truly need these design details to achieve it. And I think yes, because we simply can’t do this without good UX design, and UX design is all about these details: distinguishing between contextual and non-contextual actions (and putting them in correct places), building an intuitive hierarchy, etc.

1

u/DesignerComplaint169 Oct 22 '26

It is not a good UX - don't surprise the user, this kind of unexpected UX is not good, otherwise cool stuff technically. I think the well known UX book "Don't make the user think" did talk about the unexpected behavior.

1

u/parkhyungsok Oct 23 '26

Thanks man, what other UX related books you can suggest?

2

u/fuzlan_1 Oct 20 '26

Terrible UX