-
Notifications
You must be signed in to change notification settings - Fork 0
/
RMTopBar.h
46 lines (34 loc) · 1 KB
/
RMTopBar.h
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
42
43
44
45
46
/*
* This file is part of the RMTopBarController project.
*
* (c) Robert Mogos
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
#import <UIKit/UIKit.h>
@protocol RMTopBarDelegate;
@interface RMTopBar : UIView{
@protected
IBOutletCollection(UIButton) NSArray *barItems_;
id <RMTopBarDelegate> delegate_;
NSInteger selectedItemIndex_;
}
@property(nonatomic, assign) id <RMTopBarDelegate> delegate;
@property(nonatomic, assign) NSInteger selectedItemIndex;
/*
init a defaultTopBar using a RMTopBar.xib
*/
+ (id) defaultTopBar;
/*
init a topBar using a custom xib
*/
+ (id) topBarWithXIB:(NSString *)xibName;
- (IBAction)didSelectItem:(id)sender;
- (void) setTitle:(NSString *)text forItemAtIndex:(NSUInteger) index;
@end
@protocol RMTopBarDelegate <NSObject>
@optional
- (void) rmTopBar:(RMTopBar *)topBar didSelectItemAtIndex:(NSUInteger) index;
- (BOOL) rmTopBar:(RMTopBar *)topBar shouldSelectItemAtIndex:(NSUInteger) index;
@end