12#import <UIKit/UIKit.h>
16NS_ASSUME_NONNULL_BEGIN
26@protocol SVSegmentedControlDelegate <NSObject>
47#pragma mark - Change notification
53@property(nonatomic, copy, nullable)
void (^
changeHandler)(NSUInteger newIndex);
65@property(nonatomic, assign, nullable) id<SVSegmentedControlDelegate>
delegate;
67#pragma mark - Appearance and configuration
98@property(nonatomic, strong, nullable) UIColor *
tintColor;
110@property(nonatomic, assign)
double height;
134@property(nonatomic, strong, nullable) UIFont *
font;
140@property(nonatomic, strong, nullable) UIColor *
textColor;
154#pragma mark - Deprecated appearance aliases
174#pragma mark - Lifecycle and layout
182- (instancetype)initWithSectionTitles:(NSArray<NSString *> *)sectionTitles;
190- (void)moveThumbToIndex:(NSUInteger)segmentIndex animate:(BOOL)animate;
The sliding selected-segment highlight ("thumb") view of Sam Vermette's third-party SVSegmentedContro...
A horizontal segmented control whose selected segment is highlighted by a draggable,...
Definition SVSegmentedControl.h:46
NSUInteger selectedIndex
The index of the selected segment.
Definition SVSegmentedControl.h:79
UIColor * tintColor
The colour multiplied over the track with the overlay blend mode.
Definition SVSegmentedControl.h:98
SVSegmentedThumb * thumb
The sliding highlight, created lazily on first access.
Definition SVSegmentedControl.m:117
double height
The control's height.
Definition SVSegmentedControl.h:110
id< SVSegmentedControlDelegate > delegate
Deprecated delegate notified of selection changes.
Definition SVSegmentedControl.h:65
UIEdgeInsets titleEdgeInsets
The inset of a title inside a segment.
Definition SVSegmentedControl.h:122
UIColor * textColor
The title colour.
Definition SVSegmentedControl.h:140
UIEdgeInsets thumbEdgeInset
The inset of the thumb inside a segment.
Definition SVSegmentedControl.h:116
BOOL animateToInitialSelection
Whether the initial selection animates into place.
Definition SVSegmentedControl.h:85
CGSize shadowOffset
Deprecated alias of textShadowOffset.
Definition SVSegmentedControl.h:166
UIFont * font
The title font.
Definition SVSegmentedControl.h:134
double segmentPadding
Deprecated title padding.
Definition SVSegmentedControl.h:172
void(^ selectedSegmentChangedHandler)(id sender)
Deprecated block invoked with the control as its sender when the selection settles.
UIColor * textShadowColor
The title shadow colour.
Definition SVSegmentedControl.h:146
BOOL crossFadeLabelsOnDrag
Whether the primary and secondary labels cross-fade while the thumb is dragged.
Definition SVSegmentedControl.h:92
double cornerRadius
The corner radius of the drawn track.
Definition SVSegmentedControl.h:128
CGSize textShadowOffset
The title shadow offset.
Definition SVSegmentedControl.h:152
void(^ changeHandler)(NSUInteger newIndex)
A block invoked with the newly selected index whenever the selection changes.
UIColor * shadowColor
Deprecated alias of textShadowColor.
Definition SVSegmentedControl.h:160
UIImage * backgroundImage
A custom track background image.
Definition SVSegmentedControl.h:104
The rounded highlight the segmented control slides over its selected segment.
Definition SVSegmentedThumb.h:26