-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathIKSegmentedControl.h
More file actions
41 lines (34 loc) · 1.26 KB
/
Copy pathIKSegmentedControl.h
File metadata and controls
41 lines (34 loc) · 1.26 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
34
35
36
37
38
39
40
41
//
// IKSegmentedControl.h
// IKSegmentedControl
//
// Created by Ilya Kulakov on 4.10.10.
// Copyright 2010. All rights reserved.
@class IKSeparators;
/*
@discussion Default cornerRadius is 10.0f
*/
@interface IKSegmentedControl : UIControl {
NSMutableArray *segments;
@private
id _backgrounds[2];
IKSeparators *_separators;
}
@property (nonatomic) NSInteger selectedSegmentIndex;
@property (nonatomic, readonly) NSArray *segments;
/**
@default [UIColor lightGrayColor]
@discussion UIColor and UIImage are supported.
*/
@property (nonatomic, retain) id separator;
@property (nonatomic) BOOL separateSelectedItem; // default NO
- (id)initWithItems:(NSArray *)items;
- (void)setWidth:(CGFloat)width forSegmentAtIndex:(NSUInteger)segment; // 0.0 width indicates that IKSegmentedControl should calc width itself. Otherwise width will be used
- (CGFloat)widthForSegmentAtIndex:(NSUInteger)segment;
// UIColor and UIImage are supported.
// If object is class of UIImage then image is resized to fill IKSegment background.
// If object is class of UIColor then color is used as backgroundColor of IKSegment.
- (void)setBackgroundForNormalState:(id)normalBackground forSelectedState:(id)selectedBackground;
- (id)normalStateBackground;
- (id)selectedStateBackground;
@end