Repository navigation
Expand file tree
/
Copy pathSCISetting.h
More file actions
105 lines (77 loc) · 3.59 KB
/
Copy pathSCISetting.h
File metadata and controls
105 lines (77 loc) · 3.59 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "SCISymbol.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, SCITableCell) {
SCITableCellStatic,
SCITableCellLink,
SCITableCellSwitch,
SCITableCellStepper,
SCITableCellButton,
SCITableCellMenu,
SCITableCellNavigation,
};
///
@interface SCISetting : NSObject
@property (nonatomic, readonly) SCITableCell type;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *subtitle;
@property (nonatomic, strong, nullable) SCISymbol *icon;
@property (nonatomic, strong) NSString *defaultsKey;
@property (nonatomic, strong) NSURL *url;
@property (nonatomic, strong) NSURL *imageUrl;
@property (nonatomic) BOOL requiresRestart;
@property (nonatomic) double min;
@property (nonatomic) double max;
@property (nonatomic) double step;
@property (nonatomic, copy) NSString *label;
@property (nonatomic, copy) NSString *singularLabel;
@property (nonatomic, copy) void (^action)(void);
@property (nonatomic, strong) UIMenu *baseMenu;
@property (nonatomic, strong) NSArray *navSections;
@property (nonatomic, strong) UIViewController *navViewController;
+ (instancetype)staticCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
icon:(nullable SCISymbol *)icon;
+ (instancetype)linkCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
icon:(nullable SCISymbol *)icon
url:(NSString *)url;
+ (instancetype)linkCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
imageUrl:(NSString *)imageUrl
url:(NSString *)url;
+ (instancetype)switchCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
defaultsKey:(NSString *)defaultsKey;
+ (instancetype)switchCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
defaultsKey:(NSString *)defaultsKey
requiresRestart:(BOOL)requiresRestart;
+ (instancetype)stepperCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
defaultsKey:(NSString *)defaultsKey
min:(double)min
max:(double)max
step:(double)step
label:(NSString *)label
singularLabel:(NSString *)singularLabel;
+ (instancetype)buttonCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
icon:(nullable SCISymbol *)icon
action:(void (^)(void))action;
+ (instancetype)menuCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
menu:(UIMenu *)menu;
+ (instancetype)navigationCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
icon:(nullable SCISymbol *)icon
navSections:(NSArray *)navSections;
+ (instancetype)navigationCellWithTitle:(NSString *)title
subtitle:(NSString *)subtitle
icon:(nullable SCISymbol *)icon
viewController:(UIViewController *)viewController;
# pragma mark - Instance methods
- (UIMenu *)menuForButton:(UIButton *)button;
@end
NS_ASSUME_NONNULL_END