GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

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 try! Swift Tokyo.

SPONSORED Ready to dive into the world of Swift? try! Swift Tokyo is the premier iOS developer conference will be happened in April 9th-11th, where you can learn from industry experts, connect with fellow developers, and explore the latest in Swift and iOS development. Don’t miss out on this opportunity to level up your skills and be part of the Swift community!

Get your ticket here

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.