How to Make a Custom Segmented Control (iOS, Xcode 8, Swift 3)

Опубликовано: 04 Март 2026
на канале: Mark Moeykens
42,445
723

🌐 https://www.bigmountainstudio.com
This is a LONG video but damn it, you are going to learn a lot of cool stuff! I should have really broken them down into multiple videos now that I think about it. :(

You will learn how to build your very own custom control. By the end of this video, you will know how to put together a completely customizable and more importantly, REUSABLE, custom control.

In this video, we are making a tab control or a control that mimics the behavior of the UISegmentedControl with an animated tab highlighter.

Also, make these two changes to the code to make it work better:
1. Change to `sv.distribution = .fillEqually` (instead of .fillProportionally)
2. Add `updateView()` to the draw function

FREE SwiftUI PictureBook:
📙 SwiftUI Views: https://www.bigmountainstudio.com/fre...

COURSES
🎦 SwiftUI Courses hosted on Code with Chris: http://bigmtn.studio/cwc

#SwiftUI #Swift #bigmountainstudio