Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 46e666e

Browse files
author
张国晔
committed
Simplify Header
1 parent c0c61b9 commit 46e666e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Tweak.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
@property(strong, nonatomic) NSString *identifier;
55
@end
66

7-
@interface PSListController
7+
@interface PSListController : UITableViewController
88
- (PSSpecifier *)specifier;
9-
- (NSInteger)numberOfSectionsInTableView:(id)view;
10-
- (id)tableView:(id)view cellForRowAtIndexPath:(NSIndexPath *)indexPath;
119
@end
1210

1311
@interface PSSubtitleSwitchTableCell

Tweak.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
%hook PSListController
44

55
NSArray *map;
6-
NSInteger count = 0;
6+
NSInteger count;
77

88
- (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section {
99
NSInteger result = %orig(view, section);
@@ -17,7 +17,7 @@ - (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section {
1717
num = result - 2;
1818
NSMutableArray *data = [NSMutableArray arrayWithCapacity:num];
1919
for (NSInteger i = 0; i < num; i++) {
20-
NSString *sizeString = [[(UITableViewCell *)[self tableView:view cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:section]] detailTextLabel] text];
20+
NSString *sizeString = [self tableView:view cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:section]].detailTextLabel.text;
2121
float size = [sizeString floatValue];
2222
NSInteger length = [sizeString length];
2323
if (length > 2)

0 commit comments

Comments
 (0)