Actually, I found the Obj-C docs for UISliderTrackConfiguration.
Below is some sample code. This makes it easy for users to choose one of three positions on the slider. However, I have not been able to get any of my tick mark graphics to actually appear on the slider UI (either I or the beta API must be doing something wrong).
UISliderTick *theSliderTick0 = [UISliderTick tickWithPosition:0.0 title:@"-4" image:[UIImage systemImageNamed:@"dot.crosshair"]];
UISliderTick *theSliderTick1 = [UISliderTick tickWithPosition:0.5 title:@"0" image:[UIImage systemImageNamed:@"dot.crosshair"]];
UISliderTick *theSliderTick2 = [UISliderTick tickWithPosition:1.0 title:@"4" image:[UIImage systemImageNamed:@"dot.crosshair"]];
UISliderTrackConfiguration *theConfig = [UISliderTrackConfiguration configurationWithTicks:@[theSliderTick0, theSliderTick1, theSliderTick2]];
theConfig.allowsTickValuesOnly = NO;
theConfig.minimumEnabledValue = -4.0;
theConfig.neutralValue = 0.0;
theConfig.maximumEnabledValue = 4.0;
mySlider.trackConfiguration = theConfig;
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: