@@ -23,8 +23,8 @@ - (void)coloursView;
2323
2424@implementation RootOptionsController
2525
26- - (void )loadView {
27- [super loadView ];
26+ - (void )viewDidLoad {
27+ [super viewDidLoad ];
2828 [self coloursView ];
2929
3030 self.title = @" YouTube Reborn" ;
@@ -35,9 +35,25 @@ - (void)loadView {
3535 UIBarButtonItem *applyButton = [[UIBarButtonItem alloc ] initWithTitle: @" Apply" style: UIBarButtonItemStylePlain target: self action: @selector (apply )];
3636 self.navigationItem .rightBarButtonItem = applyButton;
3737
38- if (@available (iOS 15.0 , *)) {
39- [self .tableView setSectionHeaderTopPadding: 0 .0f ];
40- }
38+ UITableViewStyle style;
39+ if (@available (iOS 13 , *)) {
40+ style = UITableViewStyleInsetGrouped;
41+ } else {
42+ style = UITableViewStyleGrouped;
43+ }
44+
45+ self.tableView = [[UITableView alloc ] initWithFrame: CGRectZero style: style];
46+ self.tableView .translatesAutoresizingMaskIntoConstraints = NO ;
47+ self.tableView .dataSource = self;
48+ self.tableView .delegate = self;
49+ [self .view addSubview: self .tableView];
50+
51+ [NSLayoutConstraint activateConstraints: @[
52+ [self .tableView.centerXAnchor constraintEqualToAnchor: self .view.centerXAnchor],
53+ [self .tableView.centerYAnchor constraintEqualToAnchor: self .view.centerYAnchor],
54+ [self .tableView.widthAnchor constraintEqualToAnchor: self .view.widthAnchor],
55+ [self .tableView.heightAnchor constraintEqualToAnchor: self .view.heightAnchor]
56+ ]];
4157}
4258
4359- (NSInteger )numberOfSectionsInTableView : (UITableView *)tableView {
@@ -85,42 +101,64 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
85101 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
86102 if (indexPath.row == 0 ) {
87103 cell.textLabel .text = @" View Downloads" ;
104+ cell.imageView .image = [UIImage systemImageNamed: @" arrow.down.circle" ];
105+ cell.imageView .tintColor = cell.textLabel .textColor ;
88106 }
89107 if (indexPath.row == 1 ) {
90108 cell.textLabel .text = @" View Downloads In Filza" ;
109+ cell.imageView .image = [UIImage systemImageNamed: @" square.and.arrow.up.on.square" ];
110+ cell.imageView .tintColor = cell.textLabel .textColor ;
91111 }
92112 }
93113 if (indexPath.section == 1 ) {
94114 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
95115 if (indexPath.row == 0 ) {
96116 cell.textLabel .text = @" Video Options" ;
117+ cell.imageView .image = [UIImage systemImageNamed: @" play.rectangle" ];
118+ cell.imageView .tintColor = cell.textLabel .textColor ;
97119 }
98120 if (indexPath.row == 1 ) {
99121 cell.textLabel .text = @" Overlay Options" ;
122+ cell.imageView .image = [UIImage systemImageNamed: @" square.grid.3x2.fill" ];
123+ cell.imageView .tintColor = cell.textLabel .textColor ;
100124 }
101125 if (indexPath.row == 2 ) {
102126 cell.textLabel .text = @" Tab Bar Options" ;
127+ cell.imageView .image = [UIImage systemImageNamed: @" rectangle.3.offgrid.fill" ];
128+ cell.imageView .tintColor = cell.textLabel .textColor ;
103129 }
104130 if (indexPath.row == 3 ) {
105131 cell.textLabel .text = @" Colour Options" ;
132+ cell.imageView .image = [UIImage systemImageNamed: @" slider.horizontal.3" ];
133+ cell.imageView .tintColor = cell.textLabel .textColor ;
106134 }
107135 if (indexPath.row == 4 ) {
108136 cell.textLabel .text = @" Picture In Picture Options" ;
137+ cell.imageView .image = [UIImage systemImageNamed: @" pip" ];
138+ cell.imageView .tintColor = cell.textLabel .textColor ;
109139 }
110140 if (indexPath.row == 5 ) {
111141 cell.textLabel .text = @" Shorts Options" ;
142+ cell.imageView .image = [UIImage systemImageNamed: @" play.rectangle.on.rectangle.circle.fill" ];
143+ cell.imageView .tintColor = cell.textLabel .textColor ;
112144 }
113145 if (indexPath.row == 6 ) {
114146 cell.textLabel .text = @" Other Options" ;
147+ cell.imageView .image = [UIImage systemImageNamed: @" ellipsis" ];
148+ cell.imageView .tintColor = cell.textLabel .textColor ;
115149 }
116150 }
117151 if (indexPath.section == 2 ) {
118152 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
119153 if (indexPath.row == 0 ) {
120154 cell.textLabel .text = @" Reborn Settings" ;
155+ cell.imageView .image = [UIImage systemImageNamed: @" switch.2" ];
156+ cell.imageView .tintColor = cell.textLabel .textColor ;
121157 }
122158 if (indexPath.row == 1 ) {
123159 cell.textLabel .text = @" Credits" ;
160+ cell.imageView .image = [UIImage systemImageNamed: @" star.fill" ];
161+ cell.imageView .tintColor = cell.textLabel .textColor ;
124162 }
125163 }
126164 }
@@ -238,7 +276,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInte
238276 if (section == 2 ) {
239277 NSDictionary *infoDictionary = [[NSBundle mainBundle ] infoDictionary ];
240278 NSString *appVersion = infoDictionary[@" CFBundleShortVersionString" ];
241- return [NSString stringWithFormat: @" YouTube: v%@ \n YouTube Reborn: v4.2.8 \n\n @ Lillie (@LillieH1000) 2022-2024 " , appVersion];
279+ return [NSString stringWithFormat: @" YouTube: v%@ \n YouTube Reborn: v4.2.9 \n\n @ Lillie (@LillieH1000) 2022-2025 " , appVersion];
242280 }
243281 return nil ;
244282}
@@ -272,34 +310,6 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
272310
273311- (void )viewWillAppear : (BOOL )animated {
274312 [super viewWillAppear: animated];
275- self.view .layer .cornerRadius = 10.0 ;
276- self.view .layer .masksToBounds = YES ;
277- }
278-
279- - (void )viewDidLoad {
280- [super viewDidLoad ];
281- [self setBorderPropertiesForView: self .tableView];
282- [self setBorderPropertiesForView: self .view];
283- self.tableView .contentInset = UIEdgeInsetsMake (10.0 , 0.0 , 0.0 , 0.0 );
284- self.tableView .layer .borderWidth = 1.0 ;
285- self.tableView .layer .borderColor = [UIColor blackColor ].CGColor ;
286- self.tableView .layer .cornerRadius = 10.0 ;
287- self.tableView .layer .masksToBounds = true ;
288- self.view .layer .borderWidth = 1.0 ;
289- self.view .layer .borderColor = [UIColor blackColor ].CGColor ;
290- UITableView *tableView = self.tableView ;
291- tableView.contentInset = UIEdgeInsetsMake (10.0 , 0.0 , 0.0 , 0.0 );
292- tableView.layer .maskedCorners = kCALayerMinXMinYCorner ;
293- self.view .layer .borderWidth = 1.0 ;
294- self.view .layer .borderColor = [UIColor blackColor ].CGColor ;
295- self.view .layer .cornerRadius = 10.0 ;
296- self.view .layer .masksToBounds = true ;
297- self.view .layer .maskedCorners = kCALayerMaxXMinYCorner | kCALayerMinXMinYCorner ;
298- }
299-
300- - (void )setBorderPropertiesForView : (UIView *)view {
301- view.layer .borderWidth = 1.0 ;
302- view.layer .borderColor = [UIColor blackColor ].CGColor ;
303313}
304314
305315@end
0 commit comments