Loading...
Searching...
No Matches
NCFloorSelectorView.h
Go to the documentation of this file.
1//
2// NCFloorSelectorView.h
3// Floor selector widget for navigation view
4//
5
6#import <UIKit/UIKit.h>
7
8NS_ASSUME_NONNULL_BEGIN
9
11
13@interface LevelInfo : NSObject
14@property (nonatomic, strong) NSString* levelId;
15@property (nonatomic, assign) int32_t sublocationId;
16+ (instancetype)itemWithLevelId:(NSString *)levelId sublocationId:(int32_t)sublocationId;
17@end
18
20typedef void(^NCFloorSelectorCallback)(int32_t sublocationId);
21
31@interface NCFloorSelectorView : UIView <UITableViewDataSource, UITableViewDelegate>
32
38- (instancetype)initWithOrigin:(CGPoint)origin onSublocationSelected:(NCFloorSelectorCallback)onSublocationSelected;
39
46- (instancetype)initWithOrigin:(CGPoint)origin
47 onSublocationSelected:(NCFloorSelectorCallback)onSublocationSelected
48 config:(nullable NCFloorSelectorViewConfig *)config;
49
51- (void)applyConfig:(nullable NCFloorSelectorViewConfig *)config;
52
54- (void)setFloors:(NSArray<LevelInfo *> *)floors;
55
57- (void)setSublocationId:(int32_t)sublocationId;
58
59@property (nonatomic, assign) NSInteger selectedFloorIndex;
60@property (nonatomic, strong) NSArray<LevelInfo *> *floors;
61@property (nonatomic, strong) UITableView *tableView;
62@property (nonatomic, strong) UIButton *topButton;
63@property (nonatomic, strong) UIButton *bottomButton;
64@property (nonatomic, assign) CGPoint defaultPosition;
65
66@end
67
68NS_ASSUME_NONNULL_END