UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Custom tabview using a segmented control

Forums > SwiftUI

Hi,

I've got a custom segmented control which I'm using to specify which 'tab' a user is on in a detail view. This sits at the top of my page, like a normal segmented control but pretty stylised.

If I wrap the child views (there are 3) in a TabView, I get some dead space at the bottom of the view (which is caused by using the TabView - it's the page indicator ) - which I cannot remove as it's a DefaultTabView() style and no modifiers seems to help.

So.. I currently have some if conditionals to flip between views.. I figure this might not be performant? Has anyone else done this, i.e. customised the tabview to this degree?

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.