SkillAgentSearch skills...

HBSegmentedControl

Custom Segmented Control in Swift

Install / Use

/learn @hilalbaig/HBSegmentedControl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

A Swift 5 version of Custom Animated Segmented Control

alt text

Install

Drag and drop HBSegmentedControl.swift file to your project and assign it to a view from storyboard

Customization

  segmentControl.items = ["Weekly", "Fornightly", "Monthly"]
  segmentControl.borderColor = .clear
  segmentControl.selectedLabelColor = .white
  segmentControl.unselectedLabelColor = .red
  segmentControl.backgroundColor = .lightGray
  segmentControl.thumbColor = .black
  segmentControl.selectedIndex = 1
  segmentControl.addTarget(self, action: #selector(segmentValueChanged(_:)), for: .valueChanged)

Attribution

Much of the information was gleaned from appdesignvault.

View on GitHub
GitHub Stars114
CategoryDevelopment
Updated1y ago
Forks12

Languages

Swift

Security Score

70/100

Audited on Mar 15, 2025

No findings