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

Commit

Permalink
Fix for not showing Usage in iOS 6
Browse files Browse the repository at this point in the history
  • Loading branch information
张国晔 committed Mar 2, 2014
1 parent 96f1fae commit 98b90f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
%hook PSListController

- (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section {
if ([[self specifier].identifier isEqualToString:@"General"] && (section == 0))
return 1;
if ((section == 0) && [[self specifier].identifier isEqualToString:@"General"])
return %orig(view, section) - 1;
else
return %orig(view, section);
}

- (id)tableView:(id)view cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if ((indexPath.section == 0) && (indexPath.row > 0) && [[self specifier].identifier isEqualToString:@"General"])
return %orig(view, [NSIndexPath indexPathForRow:indexPath.row + 1 inSection:indexPath.section]);
else
return %orig(view, indexPath);
}

%end
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: com.ccdog.hidesoftwareupdate
Name: HideSoftwareUpdate
Depends: firmware (>= 5.0), mobilesubstrate
Version: 1.0
Version: 1.1
Architecture: iphoneos-arm
Description: Hide Software Update in Preferences.app.
Author: CC-Dog <[email protected]>
Expand Down

0 comments on commit 98b90f5

Please sign in to comment.