This repository was archived by the owner on Nov 9, 2017. It is now read-only.
File tree 4 files changed +35
-33
lines changed
4 files changed +35
-33
lines changed Original file line number Diff line number Diff line change 1
1
ARCHS = armv7 armv7s arm64
2
- TARGET = iphone:clang:7.0 :5.0
2
+ TARGET = iphone:clang:7.1 :5.0
3
3
4
4
include theos/makefiles/common.mk
5
5
Original file line number Diff line number Diff line change
1
+ @interface PSSpecifier
2
+ @property (strong , nonatomic ) NSString *identifier;
3
+ @end
4
+
5
+ @interface PSListController
6
+ - (PSSpecifier *)specifier ;
7
+ @end
Original file line number Diff line number Diff line change
1
+ #import " Tweak.h"
2
+
3
+ %hook PSListController
4
+
5
+ - (NSInteger )tableView:(id )view numberOfRowsInSection:(NSInteger )section {
6
+ if ((section == 0 ) && [[self specifier ].identifier isEqualToString: @" General" ])
7
+ return %orig (view, section) - 1 ;
8
+ else
9
+ return %orig (view, section);
10
+ }
11
+
12
+ - (id )tableView:(id )view cellForRowAtIndexPath:(NSIndexPath *)indexPath {
13
+ if ((indexPath.section == 0 ) && (indexPath.row > 0 ) && [[self specifier ].identifier isEqualToString: @" General" ])
14
+ return %orig (view, [NSIndexPath indexPathForRow: indexPath.row + 1 inSection: indexPath.section]);
15
+ else
16
+ return %orig (view, indexPath);
17
+ }
18
+
19
+ - (void )tableView:(UITableView *)view didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
20
+ if ((indexPath.section == 0 ) && (indexPath.row > 0 ) && [[self specifier ].identifier isEqualToString: @" General" ])
21
+ return %orig (view, [NSIndexPath indexPathForRow: indexPath.row + 1 inSection: indexPath.section]);
22
+ else
23
+ return %orig (view, indexPath);
24
+ }
25
+
26
+ %end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ Tweak.m
You can’t perform that action at this time.
0 commit comments