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
29 lines (22 loc) · 1 KB
/
MultiSelectSegmentedControl.h
File metadata and controls
29 lines (22 loc) · 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
//
// 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;
@protocol MultiSelectSegmentedControlDelegate <NSObject>
-(void)multiSelect:(MultiSelectSegmentedControl*) multiSelecSegmendedControl didChangeValue:(BOOL) value atIndex: (NSUInteger) index;
@end
@interface MultiSelectSegmentedControl : UISegmentedControl
@property (nonatomic, assign) NSIndexSet *selectedSegmentIndexes;
@property (nonatomic, weak) id<MultiSelectSegmentedControlDelegate> delegate;
@property (nonatomic, readonly) NSArray *selectedSegmentTitles;
@property (nonatomic, assign) BOOL hideSeparatorBetweenSelectedSegments;
- (void)selectAllSegments:(BOOL)select; // pass NO to deselect all
@end