forked from yonat/MultiSelectSegmentedControl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiSelectSegmentedControl.h
More file actions
33 lines (24 loc) · 1.1 KB
/
MultiSelectSegmentedControl.h
File metadata and controls
33 lines (24 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// MultiSelectSegmentedControl.h
//
// Created by Yonat Sharon on 19/4/13.
//
// Multiple-Selection Segmented Control
// No need for images - works with the builtin styles of UISegmentedControl.
// To get/set multiple segments programmatically, use the property
// myControl.selectedSegmentIndexes instead of myControl.selectedSegmentIndex
//
#import <UIKit/UIKit.h>
@class MultiSelectSegmentedControl;
NS_ASSUME_NONNULL_BEGIN
@protocol MultiSelectSegmentedControlDelegate <NSObject>
-(void)multiSelect:(MultiSelectSegmentedControl*) multiSelectSegmentedControl didChangeValue:(BOOL) value atIndex: (NSUInteger) index;
@end
@interface MultiSelectSegmentedControl : UISegmentedControl
@property (nonatomic, copy, null_resettable) NSIndexSet *selectedSegmentIndexes;
@property (nonatomic, weak, nullable) id<MultiSelectSegmentedControlDelegate> delegate;
@property (nonatomic, readonly) NSArray<NSString*> *selectedSegmentTitles;
@property (nonatomic, assign) IBInspectable BOOL hideSeparatorBetweenSelectedSegments;
- (void)selectAllSegments:(BOOL)select; // pass NO to deselect all
@end
NS_ASSUME_NONNULL_END